I think the error messages do a pretty good job of explaining my issue:
src\main.zig:163:33: error: expected type '[]f32', found '*const [4]f32'
const tIdx = e.x(2, 2, &[_]f32{1.0,2.0,3.0,4.0});
^~~~~~~~~~~~~~~~~~~~~~~~
src\main.zig:163:33: note: cast discards const qualifier
src\main.zig:29:67: note: parameter type declared here
pub fn x(self: *Engine, cols: usize, rows: usize, elems: []f32) XIdx {
I'd like to keep it so that e.x can be called as it is in the first error message (the main.zig:163:33 one), for the sake of a nice api. So what I'm asking is what I need to change the x signature to, but I also don't understand why const [4]f32, cant just be converted to a slice.