Hi all,
Inspired by IOhannes' answer, I manage to solve my problem and here is the result. Instead of doing some maths to compare two consecutive angles and find the shortest path between them, I simply used the following wrapping algorithm after the [line]:
input angle
|
[pack f 100]
|
[line 0 1]
|
[/ 360]
|
[wrap]
|
[* 360]
|
[earplug~]
This way, I am wrapping *after* the [line], so the result is exactly what [earplug~] expects to receive. There is still some zipper noise when the angle difference is too large in a small amount of time, but apparently this is caused by the object itself (the best I could do to improve this was to use 100ms when ramping to a new value), but the horrible click between 359.9 and 0 degrees is now gone.
Thanks to you all. Gilberto