* Added UTILS.PrintTableToLog()
This commit is contained in:
Applevangelist 2023-05-26 08:28:08 +02:00
parent 0cd6a59ce4
commit 3e6f25f17c

View File

@ -385,6 +385,23 @@ UTILS.BasicSerialize = function(s)
end
end
function UTILS.PrintTableToLog(table, indent)
if not table then
BASE:E("No table passed!")
return
end
if not indent then indent = 0 end
for k, v in pairs(table) do
if type(v) == "table" then
BASE:I(string.rep(" ", indent) .. tostring(k) .. " = {")
UTILS.PrintTableToLog(v, indent + 1)
BASE:I(string.rep(" ", indent) .. "}")
else
BASE:I(string.rep(" ", indent) .. tostring(k) .. " = " .. tostring(v))
end
end
end
UTILS.ToDegree = function(angle)
return angle*180/math.pi