aboutsummaryrefslogtreecommitdiff
path: root/src/utils.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.lua')
-rw-r--r--src/utils.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils.lua b/src/utils.lua
index 5795592..5b8258c 100644
--- a/src/utils.lua
+++ b/src/utils.lua
@@ -117,6 +117,18 @@ function table.shallow_copy(t)
return t2
end
+function table.deep_copy(datatable)
+ local tblRes={}
+ if type(datatable)=="table" then
+ for k,v in pairs(datatable) do
+ tblRes[table.deep_copy(k)] = table.deep_copy(v)
+ end
+ else
+ tblRes=datatable
+ end
+ return tblRes
+end
+
EASING_FUNCTIONS = {
Lerp = lerp
}