Here is the dot class from previous collision detection tutorials with some more additons. The move function takes
in a circle and a rectangle to check collision against when moving. We also now have a circle collider instead of a rectangle collider.

Like in previous collision detection tutorials, we move along the x axis, check collision against the
edges of the screen, and check against the other scene objects. If the dot hit something we move back. As always, whenever the dot moves its colliders move with it.

The rendering code is a little different. SDL_Rects have their position at the top left where our circle structure has the position at the center. This means we need to offset the
render position to the top left of the circle by subtracting the radius from the x and y position.

Here is our circle to circle collision detector. It simply checks if the distance squared between the centers is less than the sum of the radii squared. If it is, there is a
collison.

Why are we using the distance squared as opposed to the plain distance? Because to calculate the distance involves a square root and calculating a square root is a relatively
expensive operation. Fortunately if x > y then x^2 > y^2, so we can save a square root operation by just comparing the distance squared.

Here we find the closest y position much like we did the x position. If the distance squared between the closest point on the box and the center of the circle is less than the
circle's radius squared, then there is a collision.