Constructor for the Point class.
Either the number of dimensions of the point, or its coordinate array.
Adds a given coordinate to the end of the coordinate list.
The coordinate to be added.
The modified point.
Multiplies a matrix by the vector defined by the point.
The rotation matrix to apply to the point.
The resulting point.
Clones a Point object. Uses a simple shallow copy.
A new Point object with the same coordinates as this
.
Returns the number of dimensions of the point's space.
The number of coordinates of the point.
Calculates a point's magnitude.
The distance of a point to the origin.
Scales up this
by a factor of r
. Simple scalar multiplication.
The scaling factor.
The point this
, but scaled.
Calculates a point's magnitude.
The distance of a point to the origin.
Converts a point to the Vector3
class used by three.js. Meant only for 3D points – simply copies the coordinates over.
The Vector3
with the same coordinates as the point.
Generated using TypeDoc, the 1/31/2021 at 6:18:55 AM
A class for points in arbitary dimensions. Meant for Euclidean space, though hyperbolic space may be eventually implemented.