Fix undeclared NagView findindex() by moving it to common.
This commit is contained in:
1 parent
98164f6d4f
commit
e070dbebc1
3 files changed
+11
-9
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user