MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / mat4_mul

Function mat4_mul

native/shared/src/scene.rs:1055–1066  ·  view source on GitHub ↗
(a: &[[f32; 4]; 4], b: &[[f32; 4]; 4])

Source from the content-addressed store, hash-verified

1053}
1054
1055fn mat4_mul(a: &[[f32; 4]; 4], b: &[[f32; 4]; 4]) -> [[f32; 4]; 4] {
1056 let mut result = [[0.0f32; 4]; 4];
1057 for col in 0..4 {
1058 for row in 0..4 {
1059 result[col][row] = a[0][row] * b[col][0]
1060 + a[1][row] * b[col][1]
1061 + a[2][row] * b[col][2]
1062 + a[3][row] * b[col][3];
1063 }
1064 }
1065 result
1066}

Callers 1

prepareMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected