From 2eec7f9a6deb7aac26a8dca7a9b48d5e4667445b Mon Sep 17 00:00:00 2001 From: "techdragon.nguyen@gmail.com" Date: Sun, 5 Feb 2012 03:25:59 +0000 Subject: [PATCH] fixed calculation for magnitude. cut and paste error.. --- projects/mtg/src/GameStateDeckViewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/GameStateDeckViewer.cpp b/projects/mtg/src/GameStateDeckViewer.cpp index 4b0cac7cc..fd1047747 100644 --- a/projects/mtg/src/GameStateDeckViewer.cpp +++ b/projects/mtg/src/GameStateDeckViewer.cpp @@ -1776,7 +1776,7 @@ void GameStateDeckViewer::ButtonPressed(int controllerId, int controlId) */ void GameStateDeckViewer::OnScroll(int inXVelocity, int inYVelocity) { - int magnitude = static_cast( sqrtf( (float )( (inXVelocity * inXVelocity) + (inXVelocity * inXVelocity)))); + int magnitude = static_cast( sqrtf( (float )( (inXVelocity * inXVelocity) + (inYVelocity * inYVelocity)))); bool flickHorizontal = (abs(inXVelocity) > abs(inYVelocity)); bool flickUp = !flickHorizontal && (inYVelocity > 0) ? true : false;