question: private float applyBounce ( float velocity , float distOutOfBounds , float simulationRate ) { if ( isZero ( distOutOfBounds ) ) { return velocity ; } velocity *= - 1 ; float bounce = BOUNCE_MULTIPLIER * Math . abs ( distOutOfBounds / mIrisRadius ) ; if ( velocity > 0 ) { velocity += bounce * simulationRate ; } else { velocity -= bounce * simulationRate ; } return velocity ; }
target:  Update velocity in response to bouncing off the sides of the eye (i.e., when iris hits the bottom or the eye moves quickly).  This is the only way to gain horizontal velocity, since there is no other horizontal force.