Function rot90

Rotate a 2D vector v by 90 degrees counterclockwise.