mixRestitution static method

double mixRestitution(
  1. double restitution1,
  2. double restitution2
)

Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. For example, a super ball bounces on anything.

Implementation

static double mixRestitution(double restitution1, double restitution2) {
  return restitution1 > restitution2 ? restitution1 : restitution2;
}