[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35969] trunk/blender/source/blender/ editors/transform/transform.c: replace while loops with angle_wrap_rad()
Campbell Barton
ideasman42 at gmail.com
Sun Apr 3 07:29:58 CEST 2011
Revision: 35969
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35969
Author: campbellbarton
Date: 2011-04-03 05:29:58 +0000 (Sun, 03 Apr 2011)
Log Message:
-----------
replace while loops with angle_wrap_rad()
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform.c
Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c 2011-04-03 00:27:18 UTC (rev 35968)
+++ trunk/blender/source/blender/editors/transform/transform.c 2011-04-03 05:29:58 UTC (rev 35969)
@@ -3178,15 +3178,9 @@
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);
More information about the Bf-blender-cvs
mailing list