A base common API interface for the points to validate API parity between 3D and 2D classes.

Intended for internal usage. Use -D apicheck compilation flag to enable parity validation.

Methods

add(p:Point):Point

Returns a new Point with the sum of this Point and a given Point p.

clone():Point

Returns a copy of the Point/

distance(p:Point):Float

Returns the distance between this Point and given Point p.

distanceSq(p:Point):Unit

Returns a squared distance between this Point and given Point p.

dot(p:Point):Unit

Returns a dot product between this Point and given Point p.

equals(other:Point):Bool

Tests if this Point position equals to the position of an other Point.

length():Float

Return the length of the Point.

lengthSq():Unit

Returns a squared length of the Point.

load(p:Point):Void

Copy the position data from a given Point p to this Point.

scale(v:Unit):Void

Multiplies position of this Point by scalar v.

scaled(v:Unit):Point

Returns a new Point with the position of this Point multiplied by scalar v.

sub(p:Point):Point

Returns a new Point with the results of a subtraction of a given Point p from this Point.

toString():String

Returns a human-readable string representation of the Point.