Add support for swipe gestures from lpm state

At the moment those are integer constants, so compiler probably optimizes it away.
But once -lm is pulled in fminf() makes more sense from readability point of view.