common: fix bezAngleAt function

In the function calculating the tangent to a cubic bezier
at a given t, the atan was calculated using dx over dy,
instead of dy over dx. The error was visible during
the animation using auto-orient = true.
This commit is contained in:
Mira Grudzinska 2024-07-09 01:05:56 +02:00 committed by Hermet Park
parent 61b68fab5b
commit 2309770409

View file

@ -238,7 +238,7 @@ float bezAngleAt(const Bezier& bz, float t)
pt.x *= 3;
pt.y *= 3;
return mathRad2Deg(atan2(pt.x, pt.y));
return mathRad2Deg(atan2(pt.y, pt.x));
}