From 3ca9aedc7d64fd6b5d1f0232ffd778454082b18b Mon Sep 17 00:00:00 2001 From: Sheepolution Date: Sat, 17 Feb 2024 15:45:18 +0100 Subject: [PATCH] Fix incorrect implementation of pingpong --- mathx.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathx.lua b/mathx.lua index 1f3a51d..fb15dbf 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(f - 0.5) * 2 + return 1 - math.abs(1 - f % 2) end --quadratic ease in