diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-03 09:29:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-03 09:29:58 +0400 |
commit | 5c8234c81caf72b4424571e958be3337a6900fc7 (patch) | |
tree | 1703c067567b397ecc1c09fbd62c3d29eb55a727 /source/blender/editors | |
parent | 21bd7fd8d5fb908674efcb8528f2d4a7064ea948 (diff) |
replace while loops with angle_wrap_rad()
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index f1f49a6d88b..43e0af53ec6 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -3178,15 +3178,9 @@ int Rotation(TransInfo *t, short UNUSED(mval[2])) outputNumInput(&(t->num), c); sprintf(str, "Rot: %s %s %s", &c[0], t->con.text, t->proptext); - - /* Clamp between -180 and 180 */ - while (final >= 180.0f) - final -= 360.0f; - - while (final <= -180.0f) - final += 360.0f; - final = DEG2RADF(final); + /* Clamp between -180 and 180 */ + final= angle_wrap_rad(DEG2RADF(final)); } else { sprintf(str, "Rot: %.2f%s %s", RAD2DEGF(final), t->con.text, t->proptext); |