|
|
SharkD wrote:
> "SharkD" <nomail@nomail> wrote:
>> Check out this test scene:
>>
>> #local i = 0;
>> #local numerator = 1;
>> #local divisor = 6;
>> #while(i < numerator)
>> #local i = i + numerator/divisor;
>> #debug concat("i = ", str(i, 0, -1),"\n")
>> #end
>>
>> Shouldn't the iterations stop when i = 1? What am I doing wrong?
>
> Just to be clear, the last entry printed to the Messages panel is "i =
> 1.166667".
Change it to this:
#local i = 0;
#local numerator = 1;
#local divisor = 6;
#while(i < numerator)
#debug concat("i = ", str(i, 0, -1),"\n")
#local i = i + numerator/divisor;
#end
and it will end before reporting i>=0.
Regards,
John
Post a reply to this message
|
|