cringe deepComprasion function because effects are hard

This commit is contained in:
neckrat 2026-04-23 21:34:28 +03:00
parent 7c5314b7c8
commit 94cd2e7ee9

View File

@ -74,4 +74,20 @@ function P.lerp(from, to, t)
return from + (to - from) * t return from + (to - from) * t
end end
--- Compares two tables by their fields
--- @param t1 table
--- @param t2 table
--- @return boolean
function P.deepComprasion(t1, t2)
for k, v in pairs(t1) do
if type(v) == "table" and type(t2[k]) == "table" then
return P.deepComprasion(v, t2[k])
end
if t2[k] ~= v then
return false
end
end
return true
end
return P return P