Index: ui/events/gesture_detection/gesture_config_helper_aura.cc |
diff --git a/ui/events/gesture_detection/gesture_config_helper_aura.cc b/ui/events/gesture_detection/gesture_config_helper_aura.cc |
index 420b7fa983f7f057c84132f57ea444786a354e54..836d04b954d30357716f873786ac993b7572e7bf 100644 |
--- a/ui/events/gesture_detection/gesture_config_helper_aura.cc |
+++ b/ui/events/gesture_detection/gesture_config_helper_aura.cc |
@@ -2,8 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+// MSVC++ requires this to be set before any other includes to get M_PI. |
+#define _USE_MATH_DEFINES |
+ |
#include "ui/events/gesture_detection/gesture_config_helper.h" |
+#include <cmath> |
+ |
#include "ui/events/gestures/gesture_configuration.h" |
#include "ui/gfx/screen.h" |
@@ -30,7 +35,8 @@ GestureDetector::Config DefaultGestureDetectorConfig() { |
config.swipe_enabled = true; |
config.minimum_swipe_velocity = GestureConfiguration::min_swipe_speed(); |
config.maximum_swipe_deviation_angle = |
- atan2(1.f, GestureConfiguration::max_swipe_deviation_ratio()); |
+ atan2(1.f, GestureConfiguration::max_swipe_deviation_ratio()) * 180.0f / |
+ static_cast<float>(M_PI); |
jdduke (slow)
2014/05/05 17:52:48
Oops, good catch... Do you think it's worth having
tdresser
2014/05/05 18:11:18
I'd like to end up with ui::GestureConfiguration s
|
return config; |
} |
@@ -40,8 +46,7 @@ ScaleGestureDetector::Config DefaultScaleGestureDetectorConfig() { |
config.gesture_detector_config = DefaultGestureDetectorConfig(); |
config.min_scaling_touch_major = GestureConfiguration::default_radius() * 2; |
- config.min_scaling_span = |
- GestureConfiguration::min_distance_for_pinch_scroll_in_pixels(); |
+ config.min_scaling_span = GestureConfiguration::min_scaling_span_in_pixels(); |
return config; |
} |