ixfx
    Preparing search index...

    Namespace Vectors

    Functions

    clampMagnitude

    Clamps the magnitude of a vector

    divide

    Returns a / b.

    dotProduct

    Calculate dot product of a vector

    fromAngle

    Returns a vector from an angle. If a number is given, it's assumed to be degrees

    fromLineCartesian

    Returns a Cartesian-coordinate vector from a line a -> b

    fromLinePolar

    Returns a polar-coordinate vector from a line a -> b

    fromPointPolar

    Create a vector from a point

    fromRadians

    Returns a Cartesian-coordinate vector from an angle in radians. To create a vector from an angle in arbitrary units, use fromAngle.

    multiply

    Returns a * b.

    normalise

    Returns the normalised vector (aka unit vector). This is where direction is kept, but magnitude set to 1. This then just suggests direction.

    quadrantOffsetAngle
    subtract

    Returns a - b.

    sum

    Returns a + b.

    toCartesian

    Converts a Vector to a Cartesian coordinate. If the provided value is already Cartesian, it is returned.

    toPolar

    Converts a vector to a polar coordinate. If the provided value is already Polar, it is returned.

    toRadians
    toString

    Return a human-friendly representation of vector

    Type Aliases

    Vector