Introduction - If you have any usage issues, please Google them yourself
bouncingball we want to draw the ball as close to the side as possible.
// The following algorithm reduces the distance the ball
// travels until the new coords place it within two units
// of any of the sides