I am new to lua and I use it to automate some tasks in the female simulation model. In my script, I have this type of for loop:
for i=0.1,0.3,0.1
do
print(i)
end
The problem is only that it runs only from 0.1 to 0.2 (it is not included in i = 0.3). I tried to use other values (for example, from 0.1 to 0.4) and it works correctly. Why is this strange behavior happening? Is this a floating point problem?
source
share