From 9d9fcd20bad796c5ab136b5b010616ed63038695 Mon Sep 17 00:00:00 2001 From: Pavel fljot Date: Tue, 22 Nov 2011 10:40:42 +0200 Subject: [PATCH] Fix central point calculation for more precise transformations --- src/org/gestouch/gestures/Gesture.as | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/org/gestouch/gestures/Gesture.as b/src/org/gestouch/gestures/Gesture.as index 571560b..4caa21a 100644 --- a/src/org/gestouch/gestures/Gesture.as +++ b/src/org/gestouch/gestures/Gesture.as @@ -393,9 +393,8 @@ package org.gestouch.gestures x += touch.x; y += touch.y; } - // faster then Math.round(x / _touchesCount) - _centralPoint.x = x > 0 ? (x / _touchesCount + 0.5) >> 0 : (x / _touchesCount - 0.5) >> 0; - _centralPoint.y = y > 0 ? (y / _touchesCount + 0.5) >> 0 : (y / _touchesCount - 0.5) >> 0; + _centralPoint.x = x / _touchesCount; + _centralPoint.y = y / _touchesCount; }