rotate function

Rotate an object in 2 dimensions