Hi :)
I need a function to get overlaping between Circle => Circle ?
Any idea :) ?
I need a function to get overlaping between Circle => Circle ?
Any idea :) ?
Function RectsOverlap:Int(x0, y0, w0, h0, x2, y2, w2, h2) If x0 > (x2 + w2) Or (x0 + w0) < x2 Then Return False If y0 > (y2 + h2) Or (y0 + h0) < y2 Then Return False Return True End Function Function CircRectsOverlap(x0, y0, w0, h0, cx, cy, r) Local testX:Int=cX Local testY:Int=cY If TestX < x0 Then TestX=x0 If TestX > (x0+w0) Then TestX=(x0+w0) If TestY < y0 Then Testy=y0 If TestY > (y0+h0) Then Testy=(y0+h0) Return ((cX-TestX)*(cX-TestX)+(cY-TestY)*(cY-TestY))<r*r End Function