I just started learning Processing and probably I should give up on this until I learn more but after trying so many ways without success I would be really happy if someone told me the right way to do this:
make a shape rotate towards the mouse position with easing and not turning around when the angle goes from -PI to PI or viceversa. It's this last part that's really bugging me. Without easing this is invisible but once you see the inbetween positions of the rotation it doesn't work well at the -PI,PI border-crossing