Skip to content

Commit

Permalink
fixed broken pingpong from #72
Browse files Browse the repository at this point in the history
  • Loading branch information
1bardesign committed Mar 7, 2024
1 parent f9c1965 commit 69142df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mathx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69142df

Please sign in to comment.