Suppose I have a number, x, which should be doubled every second.
If one had a function which is called exactly once every second, the solution would be simple: All you would have to do was multiplying x by 2.
What, however, can you do to achieve the same results when working not in one-second but very tiny steps?
The target function should, given a small delta time value, still multiply x by 2 every second.
An example:
1. x == 3 2. Apply the function every millisecond for one second, therefore passing 1/1000 as parameter to it 3. Now x == 6
- How can I solve this problem?