Return x, y, z components as a length 3 tuple.
Convert a cartesian point to polar coordiantes (will use x and y components of point only).
Convert the cartesian point to spherical coordinates.
Return a point with the negative of each component.
Complex multiplication.
Multiply two 2D points such that x is the real value and y is the imaginary value of a complex number. z is ignored.
Complex division.
Divide this point by complexPoint. Each point represents a complex
number where x is the real value and y is the imaginary value.
z is ignored.
Return the distance between two points (or point and origin if no input supplied)
Return the distance between (0, 0, 0) and the point. If the point represents a vector, then it is the length of the vector.
Scalar projection of this vector in direction of vector v.
Return a vector with magnitude of the scalar projection of this vector on v and direction +/- v (depending on the sign of the scalar projection).
Returns true if the x, y, z components of the point when rounded
with precision are zero.
Return a new point with (x, y, z) values rounded to some precision
Return a new point that is clipped to min and max values from the origin.
Use a point as a parameter to define different (x, y) min/max values, a number to define the same (x, y) min/max values, or null to have no min/max values.
Transform the point with a 4x4 matrix (3 dimensional transform in homogenous coordinates)
Rotate a point some angle around a point
in radians
in radians
Return the unit vector of the point (the direction vector of length 1 from the origin to the point).
Compare two points for equality to some precision or delta
point to compare
precision to compare (8)
if true then precision is the delta value the two
points must be within to be equal
Compare two points for unequality to some precision
Object representing a point or vector.
Contains methods that makes it convenient to work with points and vectors.
See
TypeParsablePoint, isParsablePoint
Example