I have a large wheel of div's which I rotate. I use CSS transitions to make it's movement look nice. I want to be able to set it's angle arbitrarily with JavaScript.
The problem I get is that if the angle is at zero, and I want to turn it to 270, it will turn all the way clockwise to 270. I would like for it to be "smart" and know that it is shorter to turn counterclockwise 90 degrees.
So aside from using JavaScript to calculate the proper rotation (The complexity of doing this in my situation is prohibitive) is there any way to make it "smart" about turning?
EDIT: I think I have seen something like this before, something built into CSS, but I can't seem to find it anywhere.