Check how much the screen position has changed

I am running the Android test with appium, and during the execution of test I perform swipe on a screen, how can I find out how many pixels I moved in relation to original position?

Why not take the ending position of your swipe and subtract it from your starting position?