float distanceInfluenceForSnapDuration(float f){
  f-=0.5f;
  f*=SNAP_FACTOR * Math.PI / 2.0f;
  return (float)Math.sin(f);
}

float distanceInfluenceForSnapDuration ( float f ) { f -= 0.5f ; f *= SNAP_FACTOR * Math . PI / 2.0f ; return ( float ) Math . sin ( f ) ; }
we want the duration of the page snap animation to be influenced by the distance that the screen has to travel , however , we don ' t want this duration to be effected in a purely linear fashion . instead , we use this method to moderate the effect that the distance of travel has on the overall snap duration .
