I'm trying to create a wheel of fortune game.
Everything is working fine but I can't find a realistic way to decelerate the wheel rotation speed.
Currently I just tried to do something like this:
if (spin > 3) spin-=0.030;
if (spin > 2) spin-=0.020;
if (spin > 1) spin-=0.015;
if (spin > 0.5) spin-=0.010;
if (spin > 0) spin-=0.005;
if (spin < 0) spin=0;
But of course it's not a very nice approach, and even changing values here and there the result is not really satisfying.
What would be the mathematical function to gradually slow down the rotation?