Include 360 in the range and don't stop at 359. This makes cycling through the range in 90° steps less awkward.