Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. For example, a superball bounces on anything.
(restitution1, restitution2 float64)
| 13 | /// Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. |
| 14 | /// For example, a superball bounces on anything. |
| 15 | func B2MixRestitution(restitution1, restitution2 float64) float64 { |
| 16 | if restitution1 > restitution2 { |
| 17 | return restitution1 |
| 18 | } |
| 19 | |
| 20 | return restitution2 |
| 21 | } |
| 22 | |
| 23 | type B2ContactCreateFcn func(fixtureA *B2Fixture, indexA int, fixtureB *B2Fixture, indexB int) B2ContactInterface // returned contact should be a pointer |
| 24 | type B2ContactDestroyFcn func(contact B2ContactInterface) // contact should be a pointer |
no outgoing calls
no test coverage detected