OppositeEdge() static private method

static private OppositeEdge ( EdgeDir dir ) : EdgeDir
dir EdgeDir
return EdgeDir
示例#1
0
 private static bool ShouldEdgesSnap(SnapEdge a, SnapEdge b)
 {
     if ((a.dir == SnapEdge.EdgeDir.CenterX || a.dir == SnapEdge.EdgeDir.CenterY) && a.dir == b.dir)
     {
         return(true);
     }
     if (a.dir == SnapEdge.OppositeEdge(b.dir))
     {
         return(((double)a.start > (double)b.end ? 1 : ((double)a.end < (double)b.start ? 1 : 0)) == 0);
     }
     return(false);
 }
示例#2
0
 private static bool ShouldEdgesSnap(SnapEdge a, SnapEdge b)
 {
     return(((a.dir == SnapEdge.EdgeDir.CenterX || a.dir == SnapEdge.EdgeDir.CenterY) && a.dir == b.dir) || (a.dir == SnapEdge.OppositeEdge(b.dir) && (a.start <= b.end && a.end >= b.start)));
 }