diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-27 04:13:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-27 04:13:03 +0300 |
commit | 43b49130516db974c125d89919fe8ddc25cf4405 (patch) | |
tree | 0ed06e3090a10ef20ea4682edd2c3b61f5937624 /source/blender/windowmanager | |
parent | 870dfb1b5aac1c5c4dbcce0f8318c11d229bf3ac (diff) |
Math Lib: Add non-clamped round_* functions
Replace iroundf with round_fl_to_int, add other types
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 46203333eb5..e04571fe572 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -137,7 +137,7 @@ int wm_gesture_evaluate(wmGesture *gesture) int dx = BLI_rcti_size_x(rect); int dy = BLI_rcti_size_y(rect); if (abs(dx) + abs(dy) > U.tweak_threshold) { - int theta = iroundf(4.0f * atan2f((float)dy, (float)dx) / (float)M_PI); + int theta = round_fl_to_int(4.0f * atan2f((float)dy, (float)dx) / (float)M_PI); int val = EVT_GESTURE_W; if (theta == 0) val = EVT_GESTURE_E; |