import math


def getBounceAmount(currentBounce, bounceRate, bounceHeight):
    """ returns the number of pixels to offset based on the bounce
    larger bounceRate means a slower bounce
    larger bounceHeight means a higher bounce
    currentBounce will always be less than bounceRate
    """
    return int(math.sin((math.pi / float(bounceRate)) * currentBounce) * bounceHeight)