phaser - v4.0.0-rc.4
    Preparing search index...

    The Matter.Vector module contains methods for creating and manipulating vectors. Vectors are the basis of all the geometry related operations in the engine. A Matter.Vector object is of the form { x: 0, y: 0 }.

    See the included usage examples.

    Vector

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    x: number
    y: number

    Methods

    • Returns the magnitude (length) of a vector (therefore saving a sqrt operation).

      Parameters

      Returns number

      The squared magnitude of the vector

      magnitudeSquared