Example #1
0
 /// <summary>
 /// Returns a distance to the closest point on the ray
 /// </summary>
 /// <param name="rayDirection">Normalized direction of the ray</param>
 public static float PointRay(Vector2 point, Vector2 rayOrigin, Vector2 rayDirection)
 {
     return(Vector2.Distance(point, Closest.PointRay(point, rayOrigin, rayDirection)));
 }
Example #2
0
 /// <summary>
 /// Returns a distance to the closest point on the ray
 /// </summary>
 public static float PointRay(Vector2 point, Ray2D ray)
 {
     return(Vector2.Distance(point, Closest.PointRay(point, ray)));
 }