a generic 3D Vector Object
Optional
x value of the vector
y value of the vector
z value of the vector
Update this vector values to absolute values
Reference to this object for method chaining
Add the passed vector to this vector
other vector
return the angle between this vector and the passed one
angle in radians
Ceil the vector values
new Vector3d
Ceil this vector values
Clamp the vector value within the specified value range
lower bound
upper bound
Clamp this vector value within the specified value range
return a clone copy of this vector
Copy the components of the given vector into this one
calculate the cross product of this vector and the passed one
return the distance between this vector and the passed one
distance
Divide this vector values by the passed value
the value to divide the vector by
return the dot product of this vector and the passed one
The dot product.
return true if this vector is equal to the given values or vector
Rest
other vector or vector components
true if both vectors are equal
Floor the vector values
Floor this vector values
return the length (magnitude) of this vector
the length of this vector
return the square length of this vector
The length^2 of this vector.
Linearly interpolate between this vector and the given one.
distance along the line (alpha = 0 will be this vector, and alpha = 1 will be the given one).
Update this vector with the maximum value between this and the passed vector
Update this vector with the minimum value between this and the passed vector
interpolate the position of this vector on the x and y axis towards the given one by the given maximum step.
the maximum step per iteration (Negative values will push the vector away from the target)
Negate the vector values
Negate this vector values
normalize this vector (scale the vector so that its magnitude is 1)
change this vector to be perpendicular to what it was before. (Effectively rotates it 90 degrees in a clockwise direction around the z axis)
project this vector on to another vector.
The vector to project onto.
Project this vector onto a vector of unit length. This is slightly more efficient than project when dealing with unit vectors.
project
The unit vector to project onto.
Rotate this vector (counter-clockwise) by the specified angle (in radians) around the z axis
The angle to rotate (in radians)
an optional point to rotate around (on the same z axis)
Multiply this vector values by the given scalar
x component
y component
z component
Multiply this vector values by the passed vector
set the Vector x and y properties to the given values
set the Vector x and y properties using the passed vector
set the Vector x and y properties to 0
Substract the passed vector to this vector
Convert this vector into 2d coordinate space
Convert this vector into isometric coordinate space
convert the object to a string representation
stringified representation
a generic 3D Vector Object