Cycle/modulus damper

Hi,

I am just trying to create a damper for an amound of rotation.

I have a wheel which gives me values let’s say from 0-359.

When the value changes from let’s say 5 to 355 I want this values to animate backwards. So it would go for the smallest way to reach the next value inside a 360 degree circle.

This seems to be easy as there are only two or three decisions to make (value: up, down or stay). But I have a bit difficulties and my patch is becoming wired.

Is there any simple way/patch to do this?

see user tutorials. gresgn made a wonderful one about angles in 2d

Ah great. I found the cycle parameter but did not understand it, perfect.

Thanks for your fast help!