Example #1
0
 ///<summary>
 ///The proportion that, when lerped across the given line, results in the given point.
 ///If the point is not on the line segment, the result is the closest point on the extended line.
 ///</summary>
 public static double LerpProjectOnto(this Vector2d point, Line line)
 {
     return line.NearestT(point, false);
     /*var b = point - line[0];
     var d = line.Delta;
     return (b * d) / (d * d);*/
 }