diff options
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 33758d9699d..83cb6fd83d1 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -136,8 +136,8 @@ int wm_gesture_evaluate(wmGesture *gesture) rcti *rect = gesture->customdata; int dx = BLI_rcti_size_x(rect); int dy = BLI_rcti_size_y(rect); - if (ABS(dx) + ABS(dy) > U.tweak_threshold) { - int theta = (int)floor(4.0f * atan2f((float)dy, (float)dx) / (float)M_PI + 0.5f); + if (abs(dx) + abs(dy) > U.tweak_threshold) { + int theta = iroundf(4.0f * atan2f((float)dy, (float)dx) / (float)M_PI); int val = EVT_GESTURE_W; if (theta == 0) val = EVT_GESTURE_E; |