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/
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/