-
Notifications
You must be signed in to change notification settings - Fork 3
darnit_collision.h
Steven Arnow edited this page Jun 8, 2013
·
1 revision
- int d_coll_circle(int x1, int y1, int x2, int y2, int rad1, int rad2);
int d_coll_circle(int x1, int y1, int x2, int y2, int rad1, int rad2);
Tests if two circles overlap.
Arguments
- x1 - The X-coordinate for the middle of the first circle
- y1 - The Y-coordinate for the middle of the first circle
- x2 - The X-coordinate for the middle of the second circle
- y2 - The Y-coordinate for the middle of the second circle
- rad1 - The radius of the first circle
- rad2 - The radius of the second circle
Return value
Returns 0 if they do not overlap, 1 if they do.