Protected _tempTemporary vector pool (not thread-safe).
Static addStatic angleStatic cloneStatic createStatic crossStatic cross3Static divStatic dotStatic magnitudeReturns the magnitude (length) of a vector.
The magnitude of the vector
magnitude
Static magnitudeReturns the magnitude (length) of a vector (therefore saving a sqrt operation).
The squared magnitude of the vector
magnitudeSquared
Static multStatic negStatic normaliseStatic perpStatic rotateStatic rotateStatic subGenerated using TypeDoc
The
Matter.Vectormodule contains methods for creating and manipulating vectors. Vectors are the basis of all the geometry related operations in the engine. AMatter.Vectorobject is of the form{ x: 0, y: 0 }.See the included usage examples.