I need to increment an integer, but I want to ease the speed at which it’s incremented. So say for example I have an int that is equal to 0, I would like this int to get to 100 eventually but increment progressively slower. Does anyone have experience with this?
Share
hcb’s answer works for 100, but a different value would require a different ease value.
A more generalised answer would be to use a sine, which means the ease would be the same no matter what final value you wanted, or however many steps you take.