Function rotateBy

Rotate a 2D vector v by theta degrees counterclockwise.