We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've partly borrowed some code that creates a 'clock' by splitting 360 degrees around the center of the screen into 12 steps. While the circle does 'jump' between steps, the 'jumping' behaviour doesn't work the way it is supposed to. The problem is that the circle will only jump forward by one step, if the angle of the mouse is >= the angle of the step, and it jumps backwards a step as soon as the mouse angle goes below the angle of the step.
I've through various different methods tried (and failed) to create an effective method to make the stepping circle jump to the step which angle is closest to the angle of the mouse, so that it would jump step 1 when the angle was greater than 15 degrees and less than 45.
(Also: I am for some reason completely unable to format the code into the forum(???) so i've uploaded it to github): github.com/xtxte/RebelScum/blob/master/sketch_170325b.pde