1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef UI_EVENTS_GESTURES_GESTURE_UTIL_H_ 6 #define UI_EVENTS_GESTURES_GESTURE_UTIL_H_ 7 8 #include "ui/events/events_export.h" 9 10 namespace gfx { 11 class Point; 12 } // namespace gfx 13 14 namespace ui { 15 namespace gestures { 16 17 // Returns true if the distance between points |p1| and |p2| is less than a 18 // threshold. This is generally used to determine if a touch point has moved 19 // enough to be no longer considered a tap. 20 EVENTS_EXPORT bool IsInsideManhattanSquare(const gfx::Point& p1, 21 const gfx::Point& p2); 22 23 } // namespace gestures 24 } // namespace ui 25 26 #endif // UI_EVENTS_GESTURES_GESTURE_UTIL_H_ 27