I'm sorry about the title, I'm not sure what else to call it.
I have an incremental number, which itself is incremented, as follows...
At some point in the future I might be notified that Running must equal 0 again when Ticks=12845 and I'll need to put the gears into reverse. (Exact 0 is not necessary).
Is there a simple Math function that could calculate this rather than messing about with another internal loop?
Thanks.
I have an incremental number, which itself is incremented, as follows...
Code:
Damper = 0
Running = 0
Ticks = 0
Do
Damper + = -0.1
Running += Damper
Tick += 1
Loop
At some point in the future I might be notified that Running must equal 0 again when Ticks=12845 and I'll need to put the gears into reverse. (Exact 0 is not necessary).
Is there a simple Math function that could calculate this rather than messing about with another internal loop?
Thanks.