klyn.math.geometry.Point3d.distanceTo
method
public distanceTo(notnull other as Point3d<NUMBER>) as Double
Description

Computes the Euclidean distance using scaled hypot operations. Integer differences are formed before conversion when subtraction fits their domain; opposite-sign signed endpoints are widened before subtraction.

Parameters
ParameterDescription
otherTarget position.
Returns

Non-negative Double distance.

Throws
  • NullException if other is null at runtime.
Example

assert Point3d<Int>().distanceTo(Point3d<Int>(1, 2, 2)) == 3.0