bool testGesture(SwipeGesture swipe) { float angle = swipe.Direction.AngleTo(Vector.Left); if (angle < 0.8) { print("left"); disp.swipe(Direction.Left, swipe.Speed); return(true); } angle = swipe.Direction.AngleTo(Vector.Right); if (angle < 0.8) { print("right"); disp.swipe(Direction.Right, swipe.Speed); return(true); } angle = swipe.Direction.AngleTo(Vector.Up); if (angle < 0.8) { print("up"); disp.swipe(Direction.Up, swipe.Speed); return(true); } angle = swipe.Direction.AngleTo(Vector.Down); if (angle < 0.8) { print("down"); disp.swipe(Direction.Down, swipe.Speed); return(true); } angle = swipe.Direction.AngleTo(Vector.Forward); if (angle < 0.8) { print("forward"); disp.swipe(Direction.Forward, swipe.Speed); return(true); } angle = swipe.Direction.AngleTo(Vector.Backward); if (angle < 0.8) { print("backward"); disp.swipe(Direction.Backward, swipe.Speed); return(true); } return(false); }