Fix T42638: Roll angle inconsistent flip in edit mode.

Basically, `angle_compat_rad()` was completely broken -
example of result it could produce:

| new angle | compat angle |    result
| -0.000000 |   3.141593   | -> 3.141593

... Where 0.0 (or 2 * PI) would be expected!
This commit is contained in:
Bastien Montagne 2014-11-20 14:57:35 +01:00
parent d4315398fc
commit 391096252b
Notes: blender-bot 2023-02-14 10:21:15 +01:00
Referenced by issue #42638, Roll angle inconsistent flip in edit mode
1 changed files with 1 additions and 1 deletions

View File

@ -1867,7 +1867,7 @@ float angle_wrap_deg(float angle)
/* returns an angle compatible with angle_compat */
float angle_compat_rad(float angle, float angle_compat)
{
return angle + (floorf(((angle_compat - angle) / (float)M_PI) + 0.5f)) * (float)M_PI;
return angle_compat + angle_wrap_rad(angle - angle_compat);
}
/* axis conversion */