From 69142df6d48a3d73a899ee64bfa76ac938c73612 Mon Sep 17 00:00:00 2001 From: Max Cahill <1bardesign@gmail.com> Date: Thu, 7 Mar 2024 16:34:23 +1100 Subject: [PATCH] fixed broken pingpong from #72 --- mathx.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathx.lua b/mathx.lua index fb15dbf..1910389 100644 --- a/mathx.lua +++ b/mathx.lua @@ -112,7 +112,7 @@ end --pingpong from 0 to 1 and back again function mathx.pingpong(f) - return 1 - math.abs(1 - f % 2) + return 1 - math.abs(1 - (f * 2) % 2) end --quadratic ease in