Function GeometrySingleton.getClosestPointToSegmentUncapped2d

Returns the 2D point on the 2D line defined by (s1, s2) that is closest to point. The returned point can be inside the segment (s1, s2) or outside of it, i.e. somewhere on the line extending from the segment.

Vector2 getClosestPointToSegmentUncapped2d (
  const(Vector2) point,
  const(Vector2) s1,
  const(Vector2) s2
) nothrow @nogc;