Objective
Using SVG, HTML, and Javascript create a basketball that not only moves, but rotates while moving and bounces off both edges.
Problem
For me the main problem was getting the ball to bounce off exactly at the edge, so it would not go beyond the screen.
Solution
With a bit of mathematics I was able to get the ball to not go beyond the edge, by finding out what the coordinates of the ball and the two edges.