I have a loop, that runs at 1000 / 60 ~ 16.67ms.
I have a percentage float (0.0 - 1.0), and each iteration I subtract .05 from.
How do I calculate which iteration in future will set my percentage float to 0?
I have a feeling that this is simple math, but I just cannot think of the solution.
Your Float/0.05 = number of iterations it will take to reach 0 (assuming float is neatly divisible by 0.05). If it isn’t, it’ll be ceiling(YourFloat/0.05).