首页 > 解决方案 > How to math.floor to a decimal in Lua?

问题描述

print(math.floor(12.5928))

The code above prints 12. What do you do to make it print 12.5?

标签: luafloor

解决方案


print(math.floor(12.5928 * 10) / 10)


推荐阅读