3 ms·
> atan2() is incredibly useful in game development Why game development? It's useful everywhere! I have never found a genuine usage of atan(), it's always at
by enriquto 6y ago
> atan2() is incredibly useful in game development
Why game development? It's useful everywhere! I have never found a genuine usage of atan(), it's always atan2() that is natural to use.
- jacobolus 6y agoAs on example, to find longitude and latitude on a sphere from stereographic projection (given as Cartesian coordinates) you need both: [ x, y ] ↦ [ atan2(y, x), π/2 − 2 atan(√(x² + y²)) ] But atan per se comes up all over the place if you start doing much work with angle measures.
- enriquto 6y agoshouldn't that be atan(1/sqrt(x^2+y^2))? In that case, I'd still use atan2 with y=1.
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]