I'm trying to understand a bit of physics code relating to simple collision detection of circles in a game/simulation, and I see an important equation here, and I don't know what it's supposed to be doing. Can anyone identify it? It looks very familiar and simple, but I can't remember what it's for!
SQRT( (x1-x2)^2 + (y1-y2)^2 )
Here it is in python code..
if math.sqrt( ((Circle.x-Circle2.x)**2) + ((Circle.y-Circle2.y)**2) ) <= (Circle.radius+Circle2.radius):




This topic is locked










