Esempio n. 1
0
 /// <summary>
 /// Tests a segment to determine if it is within the specified distance to this point.
 /// </summary>
 /// <param name="Seg">A segment to test agianst this point.</param>
 /// <param name="Dist">The distance to return.</param>
 /// <returns>Returns true if any part of the specified segment is closer than Distance.</returns>
 public bool IsWithinADistanceOf(LineSegment Seg, double Dist)
 {
     if (Seg.Distance(this) <= Dist)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
 /// <summary>
 /// Returns the shortest distance to the specified segment
 /// </summary>
 /// <param name="Seg">The segment to find the distance to</param>
 /// <returns>Double, the shortest distance to the specified segment</returns>
 public double Distance(LineSegment Seg)
 {
     return(Seg.Distance(this));
 }