public static Vector getGForce(double m1, double m2, Vector pos1, Vector pos2) {
Vector dir = pos1.clone().invert().add(pos2);
double r = dir.getLength();
return (r < 0.0005f) ? dir.reset()
: dir.scale(G * m1 * m2 / (r * r * r));
}
/**
* Simulates a collision between two objects. As result of the simulation,
* the given linear and angular velocities (v1, v2, rot1, rot2) of the bodies