Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    make 3.60000000 into 3.6

    Help
    3
    5
    275
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sys64738
      sys64738 F last edited by

      I looked through the maths functions hoping float() or trunc() would remove the zeros but alas. Is there fuze function for it. Or do I need to make my own with string manipulation

      Thanks

      1 Reply Last reply Reply Quote 0
      • pianofire
        pianofire Fuze Team last edited by

        Have a look at this thread: https://fuzearena.com/forum/topic/118/printing-a-set-amount-of-decimal-places/7

        sys64738 1 Reply Last reply Reply Quote 1
        • sys64738
          sys64738 F @pianofire last edited by

          @pianofire exactly what was needed. Thank you

          1 Reply Last reply Reply Quote 1
          • mixaal
            mixaal F last edited by

            I think it might be good to have something like printf(format, args...):

            http://www.cplusplus.com/reference/cstdio/printf/

            in the language itself.

            1 Reply Last reply Reply Quote 2
            • sys64738
              sys64738 F last edited by

              I'm not entirely sure why it displays all the redundant 0's in floats in the first place, just a teething thing I assume

              1 Reply Last reply Reply Quote 0
              • First post
                Last post