Jump to content
xisto Community
Sign in to follow this  
rob86

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 this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.