LUA 数据比较BUG?????是不是BUG大佬帮看看

function test(money)
	for i=1,0.1,-0.1 do 
	   if tonumber(money) >= tonumber(i*9)  then
	   		return i
	   end
	end
	return 0
end

print(test(0.9)) //执行结果 0

print(_VERSION) //执行结果 Lua 5.3

//输出结果0 预期结果应该是0.1才对吧

求大佬解释解释,

猜你喜欢

转载自www.cnblogs.com/MYDoraemon/p/11355703.html
LUA