private float getScrollProgressPercent() {
        if (movedBeyondLeftBorder()) {
            return -1f;
        } else if (movedBeyondRightBorder()) {
            return 1f;
        } else {
            float zeroToOneValue = (aPosX + halfWidth - leftBorder()) / (rightBorder() - leftBorder());
            return zeroToOneValue * 2f - 1f;
        }
    }
Created by dionysis_lorentzos on 5/8/14
for package com.lorentzos.swipecards
and project Swipe cards.
Use with caution dinausaurs might appear!
library/src/main/java/com/lorentzos/flingswipe/FlingCardListener.java