Fix undeclared NagView findindex() by moving it to common.

This commit is contained in:
jgmdev
2021-06-13 21:28:29 -04:00
parent 98164f6d4f
commit e070dbebc1
3 changed files with 11 additions and 9 deletions
+7
View File
@@ -22,6 +22,13 @@ function common.round(n)
end
function common.find_index(tbl, prop)
for i, o in ipairs(tbl) do
if o[prop] then return i end
end
end
function common.lerp(a, b, t)
if type(a) ~= "table" then
return a + (b - a) * t