Smooth animations with Math.sin()
Remember geometry class? Well, I don't.
But I do know that when you're making a synthesizer, a sine wave produces a nice smooth sound.
And as it turns out, a sine wave has a smooth curve. So, you can use Math.sin()
to animate smooth motions like so: