diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-09-17 08:11:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-09-24 08:55:02 +0400 |
commit | 3a40aed3d52aeb24973385d3aa8e0c2234bf0435 (patch) | |
tree | a4a51efdc304420f0163ea40e1a14a4e206e3828 /source/blender/windowmanager/intern | |
parent | e7f495d8a076c35d2088d73fac0ed2eeb5ea1fbb (diff) |
Cleanup: use float versions of functions when in/output are floats
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 523eeb380aa..415187ecf69 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3749,8 +3749,8 @@ static void radial_control_set_initial_mouse(RadialControl *rc, const wmEvent *e d[0] = (1 - rc->initial_value) * WM_RADIAL_CONTROL_DISPLAY_WIDTH + WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE; break; case PROP_ANGLE: - d[0] = WM_RADIAL_CONTROL_DISPLAY_SIZE * cos(rc->initial_value); - d[1] = WM_RADIAL_CONTROL_DISPLAY_SIZE * sin(rc->initial_value); + d[0] = WM_RADIAL_CONTROL_DISPLAY_SIZE * cosf(rc->initial_value); + d[1] = WM_RADIAL_CONTROL_DISPLAY_SIZE * sinf(rc->initial_value); break; default: return; @@ -4251,7 +4251,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *even if (snap) new_value = ((int)ceil(new_value * 10.f) * 10.0f) / 100.f; break; case PROP_ANGLE: - new_value = atan2(delta[1], delta[0]) + M_PI + angle_precision; + new_value = atan2f(delta[1], delta[0]) + M_PI + angle_precision; new_value = fmod(new_value, 2.0f * (float)M_PI); if (new_value < 0.0f) new_value += 2.0f * (float)M_PI; |