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

Method Advance

DynamicsB2Body.go:460–467  ·  view source on GitHub ↗
(alpha float64)

Source from the content-addressed store, hash-verified

458}
459
460func (body *B2Body) Advance(alpha float64) {
461 // Advance to the new safe time. This doesn't sync the broad-phase.
462 body.M_sweep.Advance(alpha)
463 body.M_sweep.C = body.M_sweep.C0
464 body.M_sweep.A = body.M_sweep.A0
465 body.M_xf.Q.Set(body.M_sweep.A)
466 body.M_xf.P = B2Vec2Sub(body.M_sweep.C, B2RotVec2Mul(body.M_xf.Q, body.M_sweep.LocalCenter))
467}
468
469func (body B2Body) GetWorld() *B2World {
470 return body.M_world

Callers

nothing calls this directly

Calls 3

B2Vec2SubFunction · 0.85
B2RotVec2MulFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected