HaxeFlixel/flixel — pull request #844 by PaulGene (2014-01-29 23:09:03+00:00)
Title: Added some vars which let us do simple swiping.

Very simple change that is surprisingly powerful, here is an example of how it can be used:

for (touch in FlxG.touches.justReleased())
{
var swipeStart:FlxPoint = new FlxPoint(touch.justPressedScreenX, touch.justPressedScreenY);
var swipeEnd:FlxPoint = new FlxPoint(touch.screenX, touch.screenY);
var swipeDistance:Float = FlxMath.vectorLength(swipeStart.x - swipeEnd.x, swipeStart.y - swipeEnd.y);
var swipeAngle:Float = FlxAngle.getAngle(swipeStart, swipeEnd);
var swipeDuration:Float = FlxG.game.ticks - touch.justPressedTicks;
}