@sstorsveen/maths - v2.0.1
    Preparing search index...

    Module vec2

    vec2 is a collection of functions to manipulate Vec2 two-element vector objects.

    The primary use for a Vec2 object is in 2D geometry.

    Example usage:

    import * as vec2 from '@spissvinkel/maths/vec2';
    

    Functions

    of
    ofV
    zero
    one
    unitX
    unitY
    setZero
    setOne
    setUnitX
    setUnitY
    setV
    set
    addV
    addVInto
    subV
    subVInto
    addMul
    addMulInto
    mulV
    mulVInto
    mul
    mulInto
    divV
    divVInto
    div
    divInto
    inv
    invInto
    sqrMag
    mag
    norm
    normInto
    normFor
    normForInto
    dot
    perpInto
    clampV
    clampVInto
    clamp
    clampInto
    clamp01
    clamp01Into
    lerp
    lerpE
    lerp2
    equals
    toString