Index Mathematics Conjectures nbv lettuce Widgets

mat_transpose

stdlib/mat_transpose.nbv

mat_transpose(static width, mat)

No description.

Precompiles
clone!, div_exact!, len!, loop!

Source

(static width, mat)

static height = div_exact! (len! mat), width

let mut out = clone! mat
loop! height, i {
  loop! i, j {
    out[i * width + j] = mat[j * width + i]
    out[j * width + i] = mat[i * width + j]
  }
}
out