Exemplo n.º 1
0
 /// <summary>
 ///  Returns Y-value on the line segement corresponding to the given x value
 /// </summary>
 /// <param name="a_x"></param>
 /// <returns></returns>
 public float Y(float a_x)
 {
     if (XInterval.ContainsEpsilon(a_x))
     {
         return(Line.Y(a_x));
     }
     else
     {
         throw new GeomException("Y-value requested for x:" + a_x + "not in x-interval" + XInterval.ToString());
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Checks whether the points lies on this segment (with some tolerance).
 /// </summary>
 /// <param name="a_Point"></param>
 /// <returns></returns>
 public bool IsOnSegment(Vector2 a_Point)
 {
     return(XInterval.ContainsEpsilon(a_Point.x) &&
            YInterval.ContainsEpsilon(a_Point.y) &&
            Line.IsOnLine(a_Point));
 }