3 ms·
>We are inherently used to 2D coordinate systems being X, then Y. I once wasted a whole afternoon looking for a bug until I realized that atan2 takes y first,
by layoutIfNeeded 6y ago
>We are inherently used to 2D coordinate systems being X, then Y.
I once wasted a whole afternoon looking for a bug until I realized that atan2 takes y first, then x.
https://www.cplusplus.com/reference/cmath/atan2/ https://www.cplusplus.com/reference/cmath/atan2/