Distance from the origin, rounded to 6 decimals.
StaticOriginA new point at (0, 0).
Horizontal coordinate; same as x.
Horizontal coordinate; same as x.
Vertical coordinate; same as y.
Vertical coordinate; same as y.
Creates a point. Strings are parsed as numbers.
Optionalx: string | number
Horizontal coordinate. Defaults to 0.
Optionaly: string | number
Vertical coordinate. Defaults to 0.
Adds another point as a vector.
The point to add.
A new point.
Angle between two vectors; in degrees by default.
OptionalinRadians: booleanCross product using homogeneous coordinates (x, y, 1).
X component.
Y component.
Z component.
Computes the distance to another point.
The other point.
The distance, rounded to 6 decimals.
Computes the dot product.
The other vector.
The dot product, rounded to 6 decimals.
Compares with another point, allowing a difference below 0.00001 on each axis.
The other point.
true when the points are equal within that tolerance.
Same as equals.
The other point.
true when the points are equal within 0.00001 on each axis.
Returns the horizontal coordinate.
The x value.
Returns the vertical coordinate.
The y value.
Checks whether two vectors point in the same direction.
The other vector.
true when their unit vectors are equal.
Returns the unit vector in the same direction.
A new point of length 1, or (0, 0) for the zero vector.
Rotates around center; in degrees by default.
OptionalisRadians: booleanOptionalcenter: Core.Annotations.PointScales both coordinates in place.
Scale factor.
Subtracts another point as a vector.
The point to subtract.
A new point this - p.
Returns a plain object for JSON serialization.
{ x, y }.
Horizontal coordinate.
Vertical coordinate.
3×(n+1) matrix: the first column is this point, followed by the homogeneous coordinates of each point.
Returns a readable description.
A string such as '[Point: x=1 y=2]'.
Moves the point in place.
Horizontal offset.
Vertical offset.
A 2D point or vector.