(m: [[f32; 4]; 4], v: [f32; 3])
| 100 | } |
| 101 | |
| 102 | pub 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 | |
| 110 | pub 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 |
no outgoing calls
no test coverage detected