+ if(points[2].down)
+ {
+ bool same_direction = true;
+ for(unsigned i=0; (same_direction && i<2); ++i)
+ for(unsigned j=i+1; (same_direction && j<3); ++j)
+ {
+ TouchPoint &pi = points[i];
+ TouchPoint &pj = points[j];
+ same_direction = ((pi.x*pj.x+pi.y*pj.y)>2*abs(pi.x*pj.y-pi.y*pj.x));
+ }
+
+ if(same_direction)
+ current_gesture = GESTURE_DRAG_3;
+ }
+ else if(points[1].down)