you can use the dist function
when the distance between the center of the circle and the mouseX and mouseY
is smaller than the radius, we are inside
- myDist = dist ( centerX,centerY, mouseX,mouseY );
- if (myDist <= myRadius) {
- println ("inside");
- }
- else {
- println ("outside");
- }
Greetings, Chrisir
If you need an answer, please send me a personal message since this forum doesn't notify.