Log In  


Hi! I was wondering if there is a way to format floats when printing them out like you would to with the good old printf("%2f", float{2}); in c++.

Thanks!



Yes, with string.format: print(string.format("%2f", 3.14159))

I think all the standard Lua string api is here.


Oh great, thanks @drankmaniso!



[Please log in to post a comment]