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

Function mat4_scale

native/shared/src/renderer/util.rs:102–108  ·  view source on GitHub ↗
(m: [[f32; 4]; 4], v: [f32; 3])

Source from the content-addressed store, hash-verified

100}
101
102pub fn mat4_scale(m: [[f32; 4]; 4], v: [f32; 3]) -> [[f32; 4]; 4] {
103 let mut out = m;
104 for i in 0..4 { out[0][i] *= v[0]; }
105 for i in 0..4 { out[1][i] *= v[1]; }
106 for i in 0..4 { out[2][i] *= v[2]; }
107 out
108}
109
110pub fn mat4_invert(m: [[f32; 4]; 4]) -> [[f32; 4]; 4] {
111 let m = |r: usize, c: usize| m[c][r]; // accessor for row-major style

Callers 2

draw_model_cachedMethod · 0.85
submit_material_drawMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected