public static int Minus (this StrokeDirection a, StrokeDirection b) { var d = (int)a - (int)b; if (d == 3) { d = -1; } else if (d == -3) { d = 1; } return d; }