示例#1
0
 /// <summary>Returns true if the other direction is opposite to this one this one.</summary>
 public static bool IsOpposite(this CardinalDir direction, CardinalDir other)
 {
     return(direction != other && direction.Axis() == other.Axis());
 }
示例#2
0
 /// <summary>Returns true if the other direction is immediately clockwise or counterclockwise of this one.</summary>
 public static bool IsAdjacent(this CardinalDir direction, CardinalDir other)
 {
     return(direction.Axis() != other.Axis());
 }