Subscribe to my email list now at http://jauyeung.net/subscribe/
Follow me on Twitter at https://twitter.com/AuMayeung
Many more articles at http...
For further actions, you may consider blocking this person and/or reporting abuse
You missed an important fact about
Math.atan2
. It's not just the arctangent of the quotient of the arguments; it uses the signs of the arguments to determine the actual angle in [-π, π], whereasMath.atan
's range is (-π/2, π/2). Another benefit is that atan2 can compute a value when x is 0 (using atan you end up dividing by 0).Thanks for pointing that out. I should update that.
Can't believe I missed hypot all these years.
Handy for writing games or graphical programs.
Yes