mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-12 14:09:28 +00:00
Fix the calculation of the angle in the x-y plane.
This commit is contained in:
parent
5f0d6adcdd
commit
19fcfd63b4
@ -95,8 +95,9 @@ public:
|
||||
// Get the angle a vector is around the unit circle
|
||||
// (ignores z-component)
|
||||
float unitCircleAngle() const {
|
||||
float a = x() / magnitude();
|
||||
float b = y() / magnitude();
|
||||
const float mag = sqrt(x() * x() + y() * y());
|
||||
float a = x() / mag;
|
||||
float b = y() / mag;
|
||||
float yaw;
|
||||
|
||||
// find the angle on the upper half of the unit circle
|
||||
|
Loading…
x
Reference in New Issue
Block a user