Regular loops do NOT take time. (That is, “game time” does not pass. Obviously, some amount of time passes in the real world, but that doesn’t matter for your algorithm.)
It’s possible to create a loop that takes time if you use a coroutine with yield statements. You can do that if you prefer.
That just tells you that the calculators you found are that equation, not that the equation is correct. Any answer is going to be the same as itself.
Let’s try working out an example by hand:
IMPORTANT: Since you still haven’t clarified your notation, I am continuing to assume that “d” means the distance you want to accelerate over. If that’s not true, then you haven’t actually told me how this equation works, so all bets are off.
Suppose you want to accelerate to 100 units/sec over 10 units of distance.
Distance = 10 units
Final velocity = 100 units/sec
A = deltaV / 2d
A = 100 / (2*10) = 5
It’ll take (100 / 5) = 20 seconds to reach your final velocity.
If you’re willing to trust my integral, your position at the end of 20 seconds will be
x(t) = att / 2
x(20) = 52020 / 2 = 100*20 / 2 = 1000
You were supposed to accelerate over 10 units, but it actually took you 1000!
If you’re not willing to trust my integral, you can still tell you’re way off like this:
At the end of 1 second, you are going 5 units/sec. Therefore, between 1.0 sec and 2.0 sec, you must move AT LEAST 5 units. (It’ll actually be more than that because you continue accelerating during that second, but there’s no way it’ll be less than 5, because your speed was never lower than 5 during that stretch of time.)
At the end of 2 seconds, you’re going 10 units/sec. Therefore, between 2.0 sec and 3.0 sec, you must move AT LEAST 10 units.
So after just 3 seconds, we’ve already moved OVER 15 units in total, but our velocity is still only 15 units/sec, far below our target final velocity.
Of course, since the dimensional analysis is wrong, you’ll actually get different answers depending on what units you choose. A velocity of 100 units/sec is the same as a velocity of 1.67 units**/minute**, but if you try plugging in that number and solving the problem again, you’ll get a different answer, because the equation doesn’t even have correct dimensions.