Circle overlap formula
BlitzMax Forums/BlitzMax Programming/Circle overlap formula
| ||
Hi :) I need a function to get overlaping between Circle => Circle ? Any idea :) ? |
| ||
((x0-x1)^2+(y0-y1)^2)^0.5 < R0+R1 (ie. if the distance between the two centres is less than the sum of the two radus) For real circles. DOnt know how relevent to your program |
| ||
Many thanks H&K :) |
| ||
by the way, using ^ is rather slow, so use sqr((x0-x1)*(x0-x1)+(y0-y1)*(y0-y1)) |
| ||
You could also try not using sqr or ^0.5 and using {r0+r1)*(r0+r1) |