From 7fdefe5625d72f4516eface0515da6af15808840 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Tue, 30 Jun 2026 00:40:07 +0300 Subject: [PATCH] add mat4.idt to maths_inline.lua --- res/modules/internal/maths_inline.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/res/modules/internal/maths_inline.lua b/res/modules/internal/maths_inline.lua index 36c0aecfe..ecb77df97 100644 --- a/res/modules/internal/maths_inline.lua +++ b/res/modules/internal/maths_inline.lua @@ -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