Fix incorrect implementation of pingpong

This commit is contained in:
Sheepolution 2024-02-17 15:45:18 +01:00
parent ef4ef69b0f
commit 3ca9aedc7d

View File

@ -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