static IntVector2D LogAndEnqueue(Action <FovCone> enqueue, int range, IntVector2D top,
                                  IntVector2D bottom, RiseRun riseRun, int code
                                  )
 {
     if (top.GT(bottom))
     {
         var cone = new FovCone(range + 1, top, bottom, riseRun);
         FieldOfViewTrace(false, "  EQ: ({0}) code: {1}", cone, code);
         enqueue(cone);
         return(bottom);
     }
     else
     {
         return(top);
     }
 }
 static IntVector2D LogAndEnqueue(Action<FovCone> enqueue, int range, IntVector2D top,
         IntVector2D bottom, RiseRun riseRun, int code
 )
 {
     if (top.GT(bottom))
     {
         var cone = new FovCone(range + 1, top, bottom, riseRun);
     #if TraceFOV
       TraceFlag.FieldOfView.Trace(false, "  EQ: ({0}) code: {1}",cone,code);
     #endif
         enqueue(cone);
         return bottom;
     }
     else
     {
         return top;
     }
 }
 static bool LE(this IntVector2D lhs, IntVector2D rhs)
 {
     return(!lhs.GT(rhs));
 }
 static IntVector2D VectorMax(IntVector2D lhs, IntVector2D rhs)
 {
     return(lhs.GT(rhs) ? lhs : rhs);
 }
 // These are here (instead of IntVector2D.cs) because they are "upside-down" for regular use.
 static IntVector2D VectorMax(IntVector2D lhs, IntVector2D rhs)
 {
     return lhs.GT(rhs) ? lhs : rhs;
 }
예제 #6
0
 static bool LE(this IntVector2D lhs, IntVector2D rhs) => !lhs.GT(rhs);
예제 #7
0
 static IntVector2D VectorMax(IntVector2D lhs, IntVector2D rhs) => lhs.GT(rhs) ? lhs : rhs;