数学扩展模块新增lerp函数

This commit is contained in:
MrZ626
2022-01-02 20:14:26 +08:00
parent 27d9cf8a9b
commit 98050f99be

View File

@@ -20,6 +20,10 @@ function MATH.coin(a,b)
end
end
function MATH.lerp(s,e,t)
return s+(e-s)*t
end
function MATH.interval(v,low,high)
if v<=low then
return low
@@ -34,4 +38,4 @@ function MATH.expApproach(a,b,k)
return b+(a-b)*2.718281828459045^-k
end
return MATH
return MATH