/// <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()); }
/// <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()); }