distanceSqToLine3

fun distanceSqToLine3(line: Line3, c1: Vector3 = Vector3(), c2: Vector3 = Vector3()): Double

Returns the closest squared distance between this line segment and the given one line. When provided, writes the closest point on this segment into c1 and the closest point on line into c2.

Return

The squared distance between this line segment and the given one.

Parameters

line

The line segment to compute the closest squared distance to.

c1

The closest point on this line segment (default: a fresh local vector).

c2

The closest point on the given line segment (default: a fresh local vector).