Interface R3

A vector with cartesian coordinates and immutable.

interface R3 {
    x: number;
    y: number;
    z: number;
    __add__(rhs: VectorE3): Readonly<R3>;
    __mul__(rhs: number): Readonly<R3>;
    __neg__(): Readonly<R3>;
    __pos__(): Readonly<R3>;
    __radd__(lhs: VectorE3): Readonly<R3>;
    __rmul__(lhs: number): Readonly<R3>;
    __rsub__(lhs: VectorE3): Readonly<R3>;
    __sub__(rhs: VectorE3): Readonly<R3>;
    add(rhs: VectorE3): Readonly<R3>;
    cross(rhs: VectorE3): Readonly<R3>;
    direction(): Readonly<R3>;
    dot(rhs: VectorE3): number;
    magnitude(): number;
    projectionOnto(direction: VectorE3): Readonly<R3>;
    rejectionFrom(direction: VectorE3): Readonly<R3>;
    rotate(R: SpinorE3): Readonly<R3>;
    scale(α: number): Readonly<R3>;
    sub(rhs: VectorE3): Readonly<R3>;
    toString(): string;
}

Hierarchy (view full)

Properties

x: number

The Cartesian x-coordinate.

y: number

The Cartesian y-coordinate.

z: number

The Cartesian z-coordinate.

Methods

  • Returns the unit vector for this vector. Returns undefined if the magnitude is zero.

    Returns Readonly<R3>

  • Returns a string representation of an object.

    Returns string