aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 356282882..f30c08a59 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -4228,10 +4228,10 @@ void Editor::DisplayCursor(Window::Cursor c) {
}
bool Editor::DragThreshold(Point ptStart, Point ptNow) {
- const int xMove = static_cast<int>(ptStart.x - ptNow.x);
- const int yMove = static_cast<int>(ptStart.y - ptNow.y);
- const int distanceSquared = xMove * xMove + yMove * yMove;
- return distanceSquared > 16;
+ const XYPOSITION xMove = ptStart.x - ptNow.x;
+ const XYPOSITION yMove = ptStart.y - ptNow.y;
+ const XYPOSITION distanceSquared = xMove * xMove + yMove * yMove;
+ return distanceSquared > 16.0f;
}
void Editor::StartDrag() {