Ejemplo n.º 1
0
 public float GetMinResolveOverlap(AngleRange other)
 {
     if (
         this.Contains(other.rangeStart) ||
         this.Contains(other.rangeEnd) ||
         other.Contains(this.rangeStart) ||
         other.Contains(this.rangeEnd))
     {
         float resolve1 = Ang.SignedDistance(other.rangeEnd, this.rangeStart);
         float resolve2 = Ang.SignedDistance(other.rangeStart, this.rangeEnd);
         if (math.abs(resolve1) < math.abs(resolve2))
         {
             return(resolve1);
         }
         else
         {
             return(resolve2);
         }
     }
     else
     {
         return(0);
     }
 }
Ejemplo n.º 2
0
 public bool Contains(float angle)
 {
     return(Ang.CCWDistance(rangeStart, angle) <= rangeLength);
 }
Ejemplo n.º 3
0
 public AngleRange(float rangeStart, float rangeEnd)
 {
     this.rangeStart  = rangeStart;
     this.rangeLength = Ang.CCWDistance(rangeStart, rangeEnd);
 }