Log In  


Implementation and demo of the Smoothstep and Smootherstep easing functions.

See https://en.wikipedia.org/wiki/Smoothstep for more info.

Cart #dredds_smoothstep-0 | 2025-04-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Feel free to copy the functions into your own carts and tweak them as you need.

1


Nice, a very concise little demo.

Just FYI, the ^ operator on PICO-8 is quite a bit more expensive than multiplication. Think of it as a pow() function rather than an intrinsic operator. So both x*x and x*x*x are considerably less than the cost of x^2 and x^3.

Honestly, I wish the Lua parser would just catch the power being a very low whole number and replace it with the appropriate number of multiplies, but it doesn't.



[Please log in to post a comment]