mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add mat4.idt to maths_inline.lua
This commit is contained in:
parent
086067cfa9
commit
7fdefe5625
1 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue