Determining if a point is within a circle
807606Feb 18 2007 — edited Feb 19 2007Hey guys,
I have need to write an applet that does the following:
1. Draws a circle
2. When a user clicks anywhere inside the circle and drags the mouse to
a different location the circle should be redrawn in that location when mouse is released.
My question is:
How do you determine weather a mouse click occurred within a circle? I think the question is rather mathematical, basically how to check if a point
A(x, y) is inside a circle.
Thanks for your help