Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
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
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Feedback
  3. New block: Round by {number}

New block: Round by {number}

Scheduled Pinned Locked Moved Feedback
9 Posts 4 Posters 2.3k 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.
  • TheNicknameGovT Offline
    TheNicknameGovT Offline
    TheNicknameGov
    trusted helpers
    wrote on last edited by
    #1

    There’s a slight annoyance with the round block: It only rounds to the nearest ones place. What if instead of just that, you can choose from any digit (a few, for example, would be the hundredth, tenth, ones, or any decimal point place).

    This block would be a typing output and not a clicking output so they can choose any digit place to round up/down to.

    Please help all my projects are 3000+ blocks

    CreatiCodeI 1 Reply Last reply
    0
    • Tyller_T Offline
      Tyller_T Offline
      Tyller_
      trusted helpers
      wrote on last edited by
      #2

      @the_true_odst you can do this already in a simple way. Multiply the number 10 to the number of places you want (so for 3 places 10^3 or 1000), round it, then divide by that number

      For example, to round the variable “money” to the 2nd decimal: round( money * 100) / 100

      <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
      </div>

      TheNicknameGovT Rhyder ByrdA 2 Replies Last reply
      0
      • Tyller_T Tyller_

        @the_true_odst you can do this already in a simple way. Multiply the number 10 to the number of places you want (so for 3 places 10^3 or 1000), round it, then divide by that number

        For example, to round the variable “money” to the 2nd decimal: round( money * 100) / 100

        TheNicknameGovT Offline
        TheNicknameGovT Offline
        TheNicknameGov
        trusted helpers
        wrote on last edited by
        #3

        @tyller_ It would be simpler though

        Please help all my projects are 3000+ blocks

        Tyller_T 1 Reply Last reply
        0
        • Tyller_T Tyller_

          @the_true_odst you can do this already in a simple way. Multiply the number 10 to the number of places you want (so for 3 places 10^3 or 1000), round it, then divide by that number

          For example, to round the variable “money” to the 2nd decimal: round( money * 100) / 100

          Rhyder ByrdA Offline
          Rhyder ByrdA Offline
          Rhyder Byrd
          wrote on last edited by
          #4

          @tyller_ it would be a lot easier

          Tyller_T 1 Reply Last reply
          0
          • TheNicknameGovT TheNicknameGov

            There’s a slight annoyance with the round block: It only rounds to the nearest ones place. What if instead of just that, you can choose from any digit (a few, for example, would be the hundredth, tenth, ones, or any decimal point place).

            This block would be a typing output and not a clicking output so they can choose any digit place to round up/down to.

            CreatiCodeI Offline
            CreatiCodeI Offline
            CreatiCode
            wrote on last edited by
            #5

            Yes. And another issue is that the round block is from the original MIT Scratch, and we try to keep those blocks unchanged for compatibility.

            TheNicknameGovT 1 Reply Last reply
            0
            • CreatiCodeI CreatiCode

              Yes. And another issue is that the round block is from the original MIT Scratch, and we try to keep those blocks unchanged for compatibility.

              TheNicknameGovT Offline
              TheNicknameGovT Offline
              TheNicknameGov
              trusted helpers
              wrote on last edited by
              #6

              @info-creaticode What about a new block?

              Please help all my projects are 3000+ blocks

              CreatiCodeI 1 Reply Last reply
              0
              • TheNicknameGovT TheNicknameGov

                @tyller_ It would be simpler though

                Tyller_T Offline
                Tyller_T Offline
                Tyller_
                trusted helpers
                wrote on last edited by
                #7

                @the_true_odst well that method is already pretty simple, plus you could make a custom block to do it

                <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
                </div>

                1 Reply Last reply
                0
                • Rhyder ByrdA Rhyder Byrd

                  @tyller_ it would be a lot easier

                  Tyller_T Offline
                  Tyller_T Offline
                  Tyller_
                  trusted helpers
                  wrote on last edited by
                  #8

                  @attractive-milk well this one is already easy, I just suck at explaining stuff in simple ways

                  <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
                  </div>

                  1 Reply Last reply
                  0
                  • TheNicknameGovT TheNicknameGov

                    @info-creaticode What about a new block?

                    CreatiCodeI Offline
                    CreatiCodeI Offline
                    CreatiCode
                    wrote on last edited by
                    #9

                    @the_true_odst said in New block: Round by {number}:

                    What about a new block?

                    Well, it will be a bit confusing with 2 “round” blocks. Also, as shown, it is fairly easy to work around it, right?

                    d4dae5fa-1610-4f0c-8835-f3cd3c7069af-image.png

                    1 Reply Last reply
                    1

                    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

                    • Don't have an account? Register

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