News for hackers. Stuff that matters.
Re:Sin and Cos: The Programmer's Pals by tgb on Wednesday March 07, 2018 @06:57AM (#16535815)
I also think the dot product and other vector operations are more naturally the thing you're actually trying to do in the end. We generally start with a vector (say a movement command to take our unit to a certain location) and want to end up with a vector (acceleration to apply) so going through angles as the intermediate step makes little sense logically. This is true even in 2D and without speed constraints. Moreover, angles often leave you with a tricky case to handle where you are going "over 360 degrees"and there is an unnatural discontinue discontinuity.

There are no comments on this comment yet.