fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    How to Round a Variable by 2 Decimal digits

    Questions & Answers
    2
    5
    358
    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.
    • M
      mee.air last edited by

      Like I have a Variable on Chart which is Fixed for a day but since Its Calculated so it has Decimal Digits which i want to save only 2 Decimal Digits. How can I do it.

      1 Reply Last reply Reply Quote 0
      • M
        mee.air last edited by

        OK I have Used a Multiplication factor instead of Division so its Done temporarily

        S 1 Reply Last reply Reply Quote 0
        • S
          seb 0 @mee.air last edited by

          @mee-air
          To avoid bugs of extra digits appearing, I usually do that : https://fxdreema.com/shared/HhvxtRfyb

          M 1 Reply Last reply Reply Quote 0
          • M
            mee.air @seb 0 last edited by

            @seb-0 Thanks I will try to use it. b_var and a_var are what here can they be same. like I hvae a variable which i want to round off to 2 digits so can I use same var in this syntax or I have to create another one and use my intended to round one as a_var and use b_var to replace the old one.

            Its too jumbled this way I hope you can understand

            S 1 Reply Last reply Reply Quote 0
            • S
              seb 0 @mee.air last edited by seb 0

              @mee-air
              a_var is the variable you need to round, b_var is the variable that will take this rounded value. Use this formula in your project and just replace the variables with the two of you project. Write their name instead.
              Or you can transform the variable it self a_var to a rounded value, then replace b_var with a_var.
              It is actually very simple.

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

              Online Users

              T
              J
              B
              A
              T
              M
              E

              20
              Online

              146.7k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors