From 98050f99beec9cbdd35163c7cabc511de3d7090c Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 2 Jan 2022 20:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E5=AD=A6=E6=89=A9=E5=B1=95=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=96=B0=E5=A2=9Elerp=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/mathExtend.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Zframework/mathExtend.lua b/Zframework/mathExtend.lua index 5f3db7c3..9eb5786b 100644 --- a/Zframework/mathExtend.lua +++ b/Zframework/mathExtend.lua @@ -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 \ No newline at end of file +return MATH