logoalt Hacker News

direwolf20today at 1:43 AM1 replyview on HN

Why use a unit complex number (2 numbers) instead of an angle (1 number)? Maybe it optimizes out the sins and cosses better — I don't know — but a cache is not a new type of number.


Replies

ActorNightlytoday at 6:44 AM

Because rotations with complex numbers is not just rotations, its rotations+scaling.

The advantage of complex numbers is to rotate+scale something (or more generally move somewhere in a complex plane), is a one step multiplication operation.