Beispiel #1
0
        // Token: 0x0600001B RID: 27 RVA: 0x00002568 File Offset: 0x00000768
        public static double DistanceTo(this Vector2 vector, Line2 line)
        {
            DistanceVector2Line2 distanceVector2Line = new DistanceVector2Line2(vector, line);

            return(distanceVector2Line.Distance);
        }
Beispiel #2
0
        // Token: 0x0600001C RID: 28 RVA: 0x00002588 File Offset: 0x00000788
        public static Segment2 ShortestSegmentTo(this Vector2 vector, Line2 line)
        {
            DistanceVector2Line2 distanceVector2Line = new DistanceVector2Line2(vector, line);

            return(new Segment2(distanceVector2Line.ClosestPointOnVector, distanceVector2Line.ClosestPointOnLine));
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="line"></param>
        /// <param name="vector"></param>
        /// <returns></returns>
        public static Vector2 ClosestPointTo(this Line2 line, Vector2 vector)
        {
            DistanceVector2Line2 distanceVector2Line = new DistanceVector2Line2(vector, line);

            return(distanceVector2Line.ClosestPointOnLine);
        }