Set the vector axes values to absolute values
Add the provided vector to this one
Returns a copy of this vector
Returns the cross product of this vector by another.
Returns the distance between this vector and another
Divive this vector by the provided number
Divide this vector by the provided vector
Divive this vector by the provided number
Divide this vector by the provided vector
Returns the dot product of this vector by another
Check if the provided vector equal to this one
Getter for x the axis value
Getter for y axis value
Returns the magnitude (length) of this vector
Returns the squred length of this vector
Returns the magnitude (length) of this vector
Multiply this vector by the provided number
Multiply this vector by the provided vector
Multiply this vector by the provided number
Multiply this vector by the provided vector
Normalise this vector
For American spelling. Same as unit/normalise function
Reverses this vector i.e multiplies it by -1
Rotates the vetor by provided radians
Rounds this vector to n decimal places
Set both x and y axis value
New x val
New y val
Setter for x axis value
Setter for y axis.
Subtract the provided vector from this one
Return an Array containing the vector axes, e.g [0, 4]
Return an Object containing the vector axes, e.g { x: 0, y: 4 }
Return the vector as a formatted string, e.g "(0, 4)"
The same as normalise and normalize
Zeroes the vector i.e sets all axes to 0
Generated using TypeDoc
A vector representation that stores the axes in a Float32Array
const v = new Vec2D.Float32Vector(2, 5)