This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Sewbacca's profile picture

string.format %.2f

Started by Sewbacca, 20 July 2016 - 02:24 PM
Sewbacca #1
Posted 20 July 2016 - 04:24 PM
I want to format a string:

string.format('%.2f', 1.2525)
– > returns 1.2525 instead of 1.25 expected

What am I doing wrong?
Anavrins #2
Posted 20 July 2016 - 05:32 PM
This formatting is broken in the current version of LuaJ apparently.
Sewbacca #3
Posted 20 July 2016 - 05:36 PM
This formatting is broken in the current version of LuaJ apparently.

Thanks… :(/>