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

Function B2Vec2Mat22Mul

CommonB2Math.go:511–513  ·  view source on GitHub ↗

Multiply a matrix times a vector. If a rotation matrix is provided, then this transforms the vector from one frame to another.

(A B2Mat22, v B2Vec2)

Source from the content-addressed store, hash-verified

509/// Multiply a matrix times a vector. If a rotation matrix is provided,
510/// then this transforms the vector from one frame to another.
511func B2Vec2Mat22Mul(A B2Mat22, v B2Vec2) B2Vec2 {
512 return MakeB2Vec2(A.Ex.X*v.X+A.Ey.X*v.Y, A.Ex.Y*v.X+A.Ey.Y*v.Y)
513}
514
515/// Multiply a matrix transpose times a vector. If a rotation matrix is provided,
516/// then this transforms the vector from one frame to another (inverse transform).

Callers 5

B2Mat22MulFunction · 0.85

Calls 1

MakeB2Vec2Function · 0.85

Tested by

no test coverage detected