getDistance function
Implementation
double getDistance(physicsObject obj1, physicsObject obj2) {
return sqrt((obj1.xPos - obj2.xPos) * (obj1.xPos - obj2.xPos) +
(obj1.yPos - obj2.yPos) * (obj1.yPos - obj2.yPos));
}
double getDistance(physicsObject obj1, physicsObject obj2) {
return sqrt((obj1.xPos - obj2.xPos) * (obj1.xPos - obj2.xPos) +
(obj1.yPos - obj2.yPos) * (obj1.yPos - obj2.yPos));
}