Skip to content
Steven Arnow edited this page Jun 8, 2013 · 1 revision

DARNIT_COLLISION

  • int d_coll_circle(int x1, int y1, int x2, int y2, int rad1, int rad2);

d_coll_circle

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.

Clone this wiki locally