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

Function B2TransformVec2MulT

CommonB2Math.go:665–672  ·  view source on GitHub ↗
(T B2Transform, v B2Vec2)

Source from the content-addressed store, hash-verified

663}
664
665func B2TransformVec2MulT(T B2Transform, v B2Vec2) B2Vec2 {
666 px := v.X - T.P.X
667 py := v.Y - T.P.Y
668 x := (T.Q.C*px + T.Q.S*py)
669 y := (-T.Q.S*px + T.Q.C*py)
670
671 return MakeB2Vec2(x, y)
672}
673
674func B2TransformMul(A, B B2Transform) B2Transform {
675 q := B2RotMul(A.Q, B.Q)

Callers 6

GetLocalPointMethod · 0.85
B2CollidePolygonsFunction · 0.85
MakeB2MouseJointFunction · 0.85
B2CollideEdgeAndCircleFunction · 0.85
CollideMethod · 0.85

Calls 1

MakeB2Vec2Function · 0.85

Tested by

no test coverage detected