mat4.setDiagonal

set to diagonal: fill all items of matrix with zero except main diagonal items which will be assigned to v

struct mat4
ref
setDiagonal
(
float v
)

Meta