New block: Round by {number}
-
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.
-
@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
-
@tyller_ It would be simpler though
-
@tyller_ it would be a lot easier
-
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.
-
@info-creaticode What about a new block?
-
@the_true_odst well that method is already pretty simple, plus you could make a custom block to do it
-
@attractive-milk well this one is already easy, I just suck at explaining stuff in simple ways
-
@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?