For a free-time programming effort I want to map relative bearings from 0 to 360 degrees to position strings like "front", "right", "back", "left" as illustrated in the attached image.
I'm having problems with handling the "front" sector due to the transition from 359 to 0 degrees. Checking the...