Commutative in every mode, which matters: a contact between A and B must
produce the same coefficient whichever collider the solver happens to list
first, or the simulation would depend on the solver's internal pair ordering
(§33 determinism).
Throws on an unrecognized mode rather than falling through to a default. The
union makes that unreachable from TypeScript; the check exists for JavaScript
callers and for deserialized data, where a silently substituted rule would
produce a plausible-looking wrong simulation.
Applies one §25 combination rule to two coefficients.
Commutative in every mode, which matters: a contact between A and B must produce the same coefficient whichever collider the solver happens to list first, or the simulation would depend on the solver's internal pair ordering (§33 determinism).
Throws on an unrecognized mode rather than falling through to a default. The union makes that unreachable from TypeScript; the check exists for JavaScript callers and for deserialized data, where a silently substituted rule would produce a plausible-looking wrong simulation.