add mat4.idt to maths_inline.lua

This commit is contained in:
MihailRis 2026-06-30 00:40:07 +03:00
parent 086067cfa9
commit 7fdefe5625

View file

@ -238,3 +238,17 @@ function vec2.mix(a, b, t, dest)
}
end
end
function mat4.idt(dst)
if dst then
for i=1,16 do
dst[i] = (i % 5 == 1) and 1 or 0
end
end
return {
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
}
end