|
|
Well, here's what works if one value is zero and the
other is a positive number:
#declare TotalLen = 62;
#declare StartVal = 1;
#declare EndVal = 0;
#declare nRange = EndVal - StartVal;
#if (nRange != 0)
#declare nSteps = ((TotalLen / abs(nRange)) * 2) + 1;
#declare ChgVal = nRange / nSteps;
#else
#declare ChgVal = 0;
#end
Then subtract ChgVal from StartVal for every iteration. When
StartVal reaches EndVal, TotalLen is achieved.
The problem is, I want it to be able to work for an ending
or starting value that's not zero, like starting at 4 and stopping
at 2. Why does it only work for values that either start or end
at zero? It works if StartVal = 0 and EndVal = 10 and such.
Thanks for your help.
Have a great day!
=Bob=
Post a reply to this message
|
|