xisto Community

# Can Anyone Identify This Math Equation?

## Recommended Posts

I've forgotten a lot of math knowledge, so forgive me for my stupidity!

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):`

##### Share on other sites

It is the distance between two points in a plane, its just pythagoras theorem in a different way and very simple.

if you want more details check the following website distance between two points

##### Share on other sites

Ah that's right I remember it now. I knew it looked familiar, thanks.

##### Share on other sites

You crazy math geeks!Distance between two point on a plane? I simply take my ruler out and measure. I don't need no math formula for that... :)Nice, xpress for finding out so quickly. Topic is closed.

##### Share on other sites
This topic is now closed to further replies.

×