lndsld

Home > @lndsld/math > MVector2

MVector2 class

Mutable version of two-dimensional vector

Signature:

declare class MVector2 implements Vector2 

Implements: Vector2

Constructors

Constructor Modifiers Description
(constructor)(vector)   Constructs a new instance of the MVector2 class
(constructor)(start, end)   Constructs a new instance of the MVector2 class
(constructor)(x, y)   Constructs a new instance of the MVector2 class

Properties

Property Modifiers Type Description
x   number  
y   number  

Methods

Method Modifiers Description
add(vector)   Add vector
copy()   Create copy of vector
divide(number)   Divide by number
multiply(number)   Multiply by number
subtract(vector)   Subtract vector