📈Vector
A 2D Location system
If you want to store and do manipulations on 2D positions, use vector.
Example
API
Initialise
get()
returns the x and y in a json object
set()
set this instance x and y.
parameter: x: Number, y: Number
add()
adds the provided vector to the current vector
parameter: Vector
sub()
subtracts the provided vector from the current vector
parameter: Vector
mul()
multiplies the provided vector on the current vector
parameter: Vector
div()
divides the provided vector from the current vector
parameter: Vector
X
Static variable you can set
Y
Static variable you can set
Last updated