Jump to content

Choose how many decimals on a number..?


Recommended Posts

Posted

Hi there, I have a number like: "8.149461548822" and I want to only show it using 2 decimals is it possible ? like : "8.15" . is it possible ?

Thanks alot in advance.

Posted

Also, string.format and really quite a few different ways. When it comes to general Lua stuff, you'll usually get a quicker answer on Google, though.

Posted

I read on google that I could use string.format, but I though it was a better way... forgot about math.round, didnt know about the second argument :)

Thanks alot guys ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...