public float getTranslationX() {
    return calcAverage(mDetector.getCurrentX(), mDetector.getPointerCount())
        - calcAverage(mDetector.getStartX(), mDetector.getPointerCount());
  }
Gets the X component of the translation
samples/gestures/src/main/java/com/facebook/samples/gestures/TransformGestureDetector.java