In my processing program, I have made several circles positioned randomly. I used the distance formula to calculate if the mouse is over a certain area.
However, this algorithm fails when circles overlap because it thinks the mouse is over both circles. What is a way to only detect if the mouse is on the circle on top?