text: The formula for the velocities after a one-dimensional collision is:
  where
  *v is the final velocity of the first object after impact
  *v is the final velocity of the second object after impact
  *u is the initial velocity of the first object before impact
  *u is the initial velocity of the second object before impact
  *m is the mass of the first object
  *m is the mass of the second object
  *C is the coefficient of restitution; if it is 1 we have an elastic collision; if it is 0 we have a perfectly inelastic collision, see below.
  In a center of momentum frame the formulas reduce to:
  For two- and three-dimensional collisions the velocities in these formulas are the components perpendicular to the tangent line/plane at the point of contact.
  If assuming the objects are not rotating before or after the collision, the normal impulse is:
  where  is the normal vector.
  Assuming no friction, this gives the velocity updates: