I need a formula to slowly adjust one value to
another value over a known period. For example,
I have an increment value of 1 and I want that
value to decrease until it's 0 (or some other
value as needed, 0 for now). And I must reach
the known period (length in this case).
So I would be doing something like:
somelen = 62;
incval = 1;
someotherval = ?
for (x=0;x<somelen;x+=incval)
{
incval -= someotherval;
if (incval <= 0)
break;
}
I need x to achieve "somelen" and "incval" to
achieve the value of 0 at about the same time,
give or take a bit.
How do I calculate "someotherval" ?
Thanks for your help.
=Bob=
Post a reply to this message
|