Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Round a number to two decimal places: HOW?

Round a number to two decimal places: HOW?

Scheduled Pinned Locked Moved Help and Support
16 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    Deeeds
    wrote on last edited by
    #1

    I can see how to round a number to integer values, but how to get it to two decimal places?

    Or three decimal places.

    Aidan_FireA 1 Reply Last reply
    0
    • D Deeeds

      I can see how to round a number to integer values, but how to get it to two decimal places?

      Or three decimal places.

      Aidan_FireA Offline
      Aidan_FireA Offline
      Aidan_Fire
      wrote on last edited by
      #2

      @Deeeds For 2 decimal places:
      Multiply your value by 100, then round to integer, then divide by 100

      For 3 decimal places:
      Multiply your value by 1000, then round to integer, then divide by 1000

      And so on.

      D 1 Reply Last reply
      0
      • Aidan_FireA Aidan_Fire

        @Deeeds For 2 decimal places:
        Multiply your value by 100, then round to integer, then divide by 100

        For 3 decimal places:
        Multiply your value by 1000, then round to integer, then divide by 1000

        And so on.

        D Offline
        D Offline
        Deeeds
        wrote on last edited by
        #3

        @Aidan-Oxley I was afraid you were going to say this.

        I was hoping you'd say there was a rounding behaviour somewhere odd that I'd overlooked.

        Aidan_FireA 1 Reply Last reply
        0
        • D Deeeds

          @Aidan-Oxley I was afraid you were going to say this.

          I was hoping you'd say there was a rounding behaviour somewhere odd that I'd overlooked.

          Aidan_FireA Offline
          Aidan_FireA Offline
          Aidan_Fire
          wrote on last edited by
          #4

          @Deeeds I’ll go have a look myself, but I’m pretty sure there isn’t any options for that. It’s only 2 extra behaviours though.

          D 1 Reply Last reply
          0
          • Aidan_FireA Aidan_Fire

            @Deeeds I’ll go have a look myself, but I’m pretty sure there isn’t any options for that. It’s only 2 extra behaviours though.

            D Offline
            D Offline
            Deeeds
            wrote on last edited by
            #5

            @Aidan-Oxley

            3

            Aidan_FireA 1 Reply Last reply
            0
            • D Deeeds

              @Aidan-Oxley

              3

              Aidan_FireA Offline
              Aidan_FireA Offline
              Aidan_Fire
              wrote on last edited by
              #6

              @Deeeds Round on its own would be 1, round with the multiply and divide would be 3. So that’s two extra behaviours.

              D 1 Reply Last reply
              0
              • Aidan_FireA Aidan_Fire

                @Deeeds Round on its own would be 1, round with the multiply and divide would be 3. So that’s two extra behaviours.

                D Offline
                D Offline
                Deeeds
                wrote on last edited by
                #7

                @Aidan-Oxley Round should be part of a label's functionality so it's possible to work in accuracy and present with less.

                Aidan_FireA 1 Reply Last reply
                0
                • D Deeeds

                  @Aidan-Oxley Round should be part of a label's functionality so it's possible to work in accuracy and present with less.

                  Aidan_FireA Offline
                  Aidan_FireA Offline
                  Aidan_Fire
                  wrote on last edited by Aidan_Fire
                  #8

                  @Deeeds Not worth the effort, at least not in my opinion. Changing Round Number behaviour just to be able to round with custom decimals with 2 behaviours less? Not a priority. Maybe they could add it one day.

                  D 2 Replies Last reply
                  0
                  • Aidan_FireA Aidan_Fire

                    @Deeeds Not worth the effort, at least not in my opinion. Changing Round Number behaviour just to be able to round with custom decimals with 2 behaviours less? Not a priority. Maybe they could add it one day.

                    D Offline
                    D Offline
                    Deeeds
                    wrote on last edited by
                    #9

                    @Aidan-Oxley You keep talking about priority. I don't.

                    I'm talking about ideals of operation and abstraction. When they do it and if they do it is not really any of my business. My commentary is just the opinion of an arsehole.

                    Aidan_FireA 1 Reply Last reply
                    0
                    • Aidan_FireA Aidan_Fire

                      @Deeeds Not worth the effort, at least not in my opinion. Changing Round Number behaviour just to be able to round with custom decimals with 2 behaviours less? Not a priority. Maybe they could add it one day.

                      D Offline
                      D Offline
                      Deeeds
                      wrote on last edited by
                      #10

                      @Aidan-Oxley While I've got you thinking about ideals rather than prioritising:

                      Labels should also have tracking, and this should be animatable.

                      1 Reply Last reply
                      0
                      • D Deeeds

                        @Aidan-Oxley You keep talking about priority. I don't.

                        I'm talking about ideals of operation and abstraction. When they do it and if they do it is not really any of my business. My commentary is just the opinion of an arsehole.

                        Aidan_FireA Offline
                        Aidan_FireA Offline
                        Aidan_Fire
                        wrote on last edited by Aidan_Fire
                        #11

                        @Deeeds 😆 ok 👍. Yeah maybe one day

                        D 2 Replies Last reply
                        0
                        • Aidan_FireA Aidan_Fire

                          @Deeeds 😆 ok 👍. Yeah maybe one day

                          D Offline
                          D Offline
                          Deeeds
                          wrote on last edited by
                          #12

                          @Aidan-Oxley this is tracking:

                          0_1510879250849_Comp-1_1.gif

                          1 Reply Last reply
                          0
                          • Aidan_FireA Aidan_Fire

                            @Deeeds 😆 ok 👍. Yeah maybe one day

                            D Offline
                            D Offline
                            Deeeds
                            wrote on last edited by
                            #13

                            @Aidan-Oxley Sorry. Spelt your name wrong... DOH!

                            Aidan_FireA 1 Reply Last reply
                            0
                            • D Deeeds

                              @Aidan-Oxley Sorry. Spelt your name wrong... DOH!

                              Aidan_FireA Offline
                              Aidan_FireA Offline
                              Aidan_Fire
                              wrote on last edited by
                              #14

                              @Deeeds Lol everyone spells my name like that. Looks interesting, but looks like it might be pretty hard for devs to code in.

                              D 1 Reply Last reply
                              0
                              • Aidan_FireA Aidan_Fire

                                @Deeeds Lol everyone spells my name like that. Looks interesting, but looks like it might be pretty hard for devs to code in.

                                D Offline
                                D Offline
                                Deeeds
                                wrote on last edited by
                                #15

                                @Aidan-Oxley No. Tracking is a value of Labels. It's the space between letters. Very common element of fonts. BMFonts even support kerning pairs.

                                Aidan_FireA 1 Reply Last reply
                                0
                                • D Deeeds

                                  @Aidan-Oxley No. Tracking is a value of Labels. It's the space between letters. Very common element of fonts. BMFonts even support kerning pairs.

                                  Aidan_FireA Offline
                                  Aidan_FireA Offline
                                  Aidan_Fire
                                  wrote on last edited by
                                  #16

                                  @Deeeds Ohhh I see. So being able to change space between letters in a label. Not a bad idea.

                                  1 Reply Last reply
                                  0

                                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                  With your input, this post could be even better 💗

                                  Register Login
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • Users
                                  • Search