Lua – Number to string behaviour
In Lua 5.2 or earlier, both tostring(10) and tostring(10.0) result as the string “10”. In Lua 5.3, this has changed: That’s because Lua 5.3 introduced the integer subtype. From Changes in the Language: The conversion of a float to a string now adds a .0 suffix to the result if it looks like an integer. (For instance, the float 2.0 will be printed as 2.0, not … Read more