How to math.floor to a decimal in Lua?

Gatitos Mansion picture Gatitos Mansion · Apr 28, 2018 · Viewed 16.3k times · Source
print(math.floor(12.5928))

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

Answer

Maxime Chéramy picture Maxime Chéramy · Apr 28, 2018

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