a number which varies between 0 and 2pi is controlled by an endless enconder, in this case, the rotation of a tuio object.
if the rotation of the encoder is clockwise and over 360º (2pi) then the value begins at 0 again and increases towards 2pi again. conversely, if the rotation is counter-clockwise and under 0º then the value begins at 2pi and decreases towards 0 again.
what would be the best practice for keeping the value at 2pi (ie, maximum) if the rotation is clockwise and keeping it at 0 (ie minimum) if the rotation is counter-clockwise? i can imagine that with conditionals and/or loops this shouldn't be that difficult to do, but maybe there is already an object in PD for this sort of task?
any input welcome, thanks for reading,
bernardo