MCPcopy Create free account
hub / github.com/ByteArena/box2d / B2MixFriction

Function B2MixFriction

DynamicsB2Contact.go:9–11  ·  view source on GitHub ↗

Friction mixing law. The idea is to allow either fixture to drive the friction to zero. For example, anything slides on ice.

(friction1, friction2 float64)

Source from the content-addressed store, hash-verified

7/// Friction mixing law. The idea is to allow either fixture to drive the friction to zero.
8/// For example, anything slides on ice.
9func B2MixFriction(friction1, friction2 float64) float64 {
10 return math.Sqrt(friction1 * friction2)
11}
12
13/// Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface.
14/// For example, a superball bounces on anything.

Callers 2

ResetFrictionMethod · 0.85
MakeB2ContactFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected