I am trying to write a function that answers the question: if you start counting with a and stop counting in b , this is c in this range (aka c between a and b ).
Usually a < c && c < b enough, but I'm in modular arithmetic:

Increases counterclockwise.
Greens: these are the values ββfor c, where the algorithm should indicate true (where c is between a and b)
Blue colors: these are the values ββfor c, where the algorithm should indicate false (where c is not between a and b) (which is the same as where c is between b and )
The simple a < c && c < b fails when the range of a and b crosses 0.
For example, say A = 300 and B = 45. If C is 10, the function should return true: 300 , 301, 302 ... 359, 0, 1, 2, 3 ... 8, 9, 10 , 11, 12 ... 43, 44, 45 . Therefore, 10 is between 300 and 45 in 360 mode.
In the end, what I'm trying to determine is one shade between two other shades, where shades are set in degrees around the color wheel (this is a mod 360 system). It would be great if the answer was in terms of mod n, so it would solve the general case and not be specific to my problem.