-
Notifications
You must be signed in to change notification settings - Fork 0
Point_in_circle
hpgDesigns edited this page Aug 8, 2021
·
1 revision
Checks if the given point is inside the given circle and returns the result.
| Parameter | Data Type | Description |
|---|---|---|
| px | double | x coordinate of the point |
| py | double | y coordinate of the point |
| cx | double | x coordinate of the circle center |
| cy | double | y coordinate of the circle center |
| rad | double | radius of the circle |
boolean: Returns whether the point lies inside the circle.
// demonstrates checking if the mouse is hovering over an object
if (point_in_circle(mouse_x, mouse_y, x, y, radius)) {
// mouse is within 50 pixels of the calling instance
}
NOTOC
Category:Function:Real
This is number 1