/// <summary> /// Returns the distance between the closest points on the segment and the circle /// </summary> public static float SegmentCircle(Segment2 segment, Circle2 circle) { return(SegmentCircle(segment.a, segment.b, circle.center, circle.radius)); }
/// <summary> /// Returns the distance between the closest points on the segments /// </summary> public static float SegmentSegment(Segment2 segment1, Segment2 segment2) { return(SegmentSegment(segment1.a, segment1.b, segment2.a, segment2.b)); }
/// <summary> /// Returns the distance between the closest points on the ray and the segment /// </summary> public static float RaySegment(Ray2D ray, Segment2 segment) { return(RaySegment(ray.origin, ray.direction, segment.a, segment.b)); }
/// <summary> /// Returns a distance to the closest point on the segment /// </summary> public static float PointSegment(Vector2 point, Segment2 segment) { return(Vector2.Distance(point, Closest.PointSegment(point, segment))); }
/// <summary> /// Returns the distance between the closest points on the line and the segment /// </summary> public static float LineSegment(Line2 line, Segment2 segment) { return(LineSegment(line.origin, line.direction, segment.a, segment.b)); }