sparkengineweb
    Preparing search index...

    Class Vec2

    Bidimentional Vector

    Index

    Constructors

    Properties

    x: number = 0
    y: number = 0

    Accessors

    Methods

    • Computes the dot product between this vector and another one

      Parameters

      • other: Vec2

        the other vector to use for the computation

      Returns number

      the dot product between the vectors

    • Multiplies this vector in place by a scalar value.

      Parameters

      • scalar: number

      Returns Vec2

      Chainable this

    • Constructs a new vec2 from another one.

      Parameters

      • other: Vec2

        the other vec2 to construct a new one from

      Returns Vec2

      a new vec2