SyntaxFix
Write A Post
Hire A Developer
Questions
Rotating a vector 90 degrees is particularily simple.
(x, y) rotated 90 degrees around (0, 0) is (-y, x).
(x, y)
(0, 0)
(-y, x)
If you want to rotate clockwise, you simply do it the other way around, getting (y, -x).
(y, -x)