Discuss Scratch
- EIephant_Lover
-
Scratcher
500+ posts
Easier way to choose what to round to
Okay, so I am well aware there is a way around this, but for newer Scratchers (or Scratchers who aren't very good at coming up with logical workarounds), this can be immensely confusing. With the “round ()” block, it always, always rounds to the nearest whole number. The block should be revamped to look like this:
So here's a run-down of how it would work:
If you are confused about why it is a dropdown, it is so you can also use it for the “floor” and “ceiling” functions.
This way, we could choose the place on all of those blocks.
([round v] (13.3235) to [0.01] ▲▼ place :: operators)With this block, the up and down buttons change the “0.01” to different numbers, e.g. if you clicked the up arrow it would change to 0.1 and the down arrow would change to 0.001. This is a non-editable text field.
So here's a run-down of how it would work:
([round v] (13.3235) to [0.01] ▲▼ place :: operators // Reports 13.32
([round v] (13.3235) to [0.1] ▲▼ place:: operators // 13.3
([round v] (13.3235) to [0.001] ▲▼ place :: operators // 13.324
([round v] (13.3235) to [10] ▲▼ place :: operators // 10
([round v] (654632486) to [10000] ▲▼ place :: operators // 654630000
If you are confused about why it is a dropdown, it is so you can also use it for the “floor” and “ceiling” functions.
([floor v] (9.38024) to [0.1] ▲▼ place :: operators // Reports 9.3
([ceiling v] (9.31024) to [0.1] ▲▼ place :: operators // Reports 9.4
This way, we could choose the place on all of those blocks.
Last edited by EIephant_Lover (May 30, 2020 03:36:04)
- Botcho_Otkho
-
Scratcher
1000+ posts
Easier way to choose what to round to
I think it's a great idea. Would it also work if it was like this:
[round v] to the (1000) place (12395391)::operators reporter?
- EIephant_Lover
-
Scratcher
500+ posts
Easier way to choose what to round to
I think it's a great idea. Would it also work if it was like this:Yep, it would report 12395000.[round v] to the (1000) place (12395391)::operators reporter?
- Za-Chary
-
Scratcher
1000+ posts
Easier way to choose what to round to
Would it also work if it was like this?
[round v] to the (3) place (17)::operators reporter
- WindOctahedron
-
Scratcher
1000+ posts
Easier way to choose what to round to
Would it also work if it was like this?The answer:[round v] to the (3) place (17)::operators reporter
The input should only allow zeroes, ones, and decimals.
- Rocket-Flier
-
Scratcher
100+ posts
Easier way to choose what to round to
It would be easier to understand like this:
round to the (10)th place of (6783) :: operators reporter
- hedgehog_blue
-
Scratcher
1000+ posts
Easier way to choose what to round to
It would be easier to understand like this:If you remove the phrase “to the (10)th place”, you getround to the (10)th place of (6783) :: operators reporter
round of (6783)
what is the round of something? The existing block says (round ()) without saying of.
To keep with the current logic, think it should be
(round () to the ()th place::operators)(yes, I know a reporter should be a noun and not an verb, but the current round block phrases it as an verb so this is just to keep it the same, and because round can't be used as a noun the way you are)
- EIephant_Lover
-
Scratcher
500+ posts
Easier way to choose what to round to
I think of the original block to mean more “rounded version of ()”, so it is a noun, and still uses the “of”. Also, yes - if you remove that phrase, it does say that. But you can't remove it, because the sentence isn't “round, to the tenth place, of…”, it's “round to the tenth place of”. You are rounding to a part of the number. Take the sentence “He came in the fifth place of the race.” Now remove “in the fifth place” and the sentence says “He came of the race.” You can't just remove a part of it like that.It would be easier to understand like this:If you remove the phrase “to the (10)th place”, you getround to the (10)th place of (6783) :: operators reporter
round of (6783)
what is the round of something? The existing block says (round ()) without saying of.
To keep with the current logic, think it should be(round () to the ()th place::operators)(yes, I know a reporter should be a noun and not an verb, but the current round block phrases it as an verb so this is just to keep it the same, and because round can't be used as a noun the way you are)
Why has the block suggestion become a grammar discussion about what exactly the wording should be?
Edit; You wrote “(10)th place”, which would make sense - it would be said as 10 (ten) + th, or tenth. But what if you wrote 0.1th? Would you say “zero point oneth” place, or the “one tenthth” place? Neither make sense.
Last edited by EIephant_Lover (July 2, 2019 18:05:26)
- WindOctahedron
-
Scratcher
1000+ posts
Easier way to choose what to round to
I thought that it would be better if the block looked like this:
([round v] to the 1/10^() place () :: operators)That way, the input would accept every number. However, I think that it might be confusing.
- EIephant_Lover
-
Scratcher
500+ posts
Easier way to choose what to round to
I thought that it would be better if the block looked like this:I think that would be confusing for newer Scratchers, to be honest that makes a little more sense.([round v] to the 1/10^() place () :: operators)That way, the input would accept every number. However, I think that it might be confusing.
- coder2045
-
Scratcher
1000+ posts
Easier way to choose what to round to
I thought that it would be better if the block looked like this:How about([round v] to the 1/10^() place () :: operators)That way, the input would accept every number. However, I think that it might be confusing.
([round v] () to the nearest [0.01 v]::operators) //Options for the second dropdown: 0.001, 0.01, 0.1, 10, 100,etc.
Last edited by coder2045 (July 9, 2019 19:31:07)
- coder2045
-
Scratcher
1000+ posts
Easier way to choose what to round to
I thought that it would be better if the block looked like this:What does that even mean?([round v] to the 1/10^() place () :: operators)That way, the input would accept every number. However, I think that it might be confusing.
- Botcho_Otkho
-
Scratcher
1000+ posts
Easier way to choose what to round to
Meaning there would be an infinite amount of inputs. I think the one above is the clearest for New Scratchers.I thought that it would be better if the block looked like this:How about([round v] to the 1/10^() place () :: operators)That way, the input would accept every number. However, I think that it might be confusing.([round v] () to the nearest [0.01 v]::operators) //Options for the second dropdown: 0.001, 0.01, 0.1, 10, 100,etc.
- EIephant_Lover
-
Scratcher
500+ posts
Easier way to choose what to round to
I've explained why I don't want a dropdown in the original post, I'll do it a bit shorter:I thought that it would be better if the block looked like this:How about([round v] to the 1/10^() place () :: operators)That way, the input would accept every number. However, I think that it might be confusing.([round v] () to the nearest [0.01 v]::operators) //Options for the second dropdown: 0.001, 0.01, 0.1, 10, 100,etc.
It's so the ST doesn't have to put every single number in it, and so that maybe if a Scratch wanted to round to a more or less precise number they could.
Maybe this would work better:
([round v] () to [0.1] ▲▼ place :: operators)The up and down buttons make it more or less precise, so there isn't a dropdown but you can't type in it.
Last edited by EIephant_Lover (July 9, 2019 19:35:38)
- coder2045
-
Scratcher
1000+ posts
Easier way to choose what to round to
Would it also work if it was like this?No offense,. Za-Chary, but it would be really strange to round something to the nearest 3 (or 7 or 11 or 3.1415…)[round v] to the (3) place (17)::operators reporter
- coder2045
-
Scratcher
1000+ posts
Easier way to choose what to round to
Where did you get those buttons from?I've explained why I don't want a dropdown in the original post, I'll do it a bit shorter:I thought that it would be better if the block looked like this:How about([round v] to the 1/10^() place () :: operators)That way, the input would accept every number. However, I think that it might be confusing.([round v] () to the nearest [0.01 v]::operators) //Options for the second dropdown: 0.001, 0.01, 0.1, 10, 100,etc.
It's so the ST doesn't have to put every single number in it, and so that maybe if a Scratch wanted to round to a more or less precise number they could.
Maybe this would work better:([round v] () to [0.1] ▲▼ place :: operators)The up and down buttons make it more or less precise, so there isn't a dropdown but you can't type in it.
- EIephant_Lover
-
Scratcher
500+ posts
Easier way to choose what to round to
They're just a copy/paste thing on some website, they don't exist in any Scratch blocks.Where did you get those buttons from?I've explained why I don't want a dropdown in the original post, I'll do it a bit shorter:I thought that it would be better if the block looked like this:How about([round v] to the 1/10^() place () :: operators)That way, the input would accept every number. However, I think that it might be confusing.([round v] () to the nearest [0.01 v]::operators) //Options for the second dropdown: 0.001, 0.01, 0.1, 10, 100,etc.
It's so the ST doesn't have to put every single number in it, and so that maybe if a Scratch wanted to round to a more or less precise number they could.
Maybe this would work better:([round v] () to [0.1] ▲▼ place :: operators)The up and down buttons make it more or less precise, so there isn't a dropdown but you can't type in it.
- BlueStarPort
-
Scratcher
100+ posts
Easier way to choose what to round to
Support. This would be much better than the old one, and this would put less restrictions on coding.
- StrangeMagic32
-
Scratcher
1000+ posts
Easier way to choose what to round to
No support
all in all I would be very confused.
This makes more sense to me
Not 100% sure if that is proper rounding, but I'd rather deal with that than
Also as far as I know this is easily work-aroundable
with
all in all I would be very confused.
This makes more sense to me
((round ((1514) * (3))) / (3))
Not 100% sure if that is proper rounding, but I'd rather deal with that than
([round v] to the (1000) place (1514) :: operators
Also as far as I know this is easily work-aroundable
with
((round (() / ())) * ())
((round (() * ())) / ())
Last edited by StrangeMagic32 (July 10, 2019 21:18:28)
- EIephant_Lover
-
Scratcher
500+ posts
Easier way to choose what to round to
No supportIt is workaroundable, but your first thing didn't make sense, not to be rude XD What that would do is multiply 1514 by three, and since it only rounds to the ones place, it would just divide it by three and you'd get 1514.
all in all I would be very confused.
This makes more sense to me((round ((1514) * (3))) / (3))
Not 100% sure if that is proper rounding, but I'd rather deal with that than([round v] to the (1000) place (1514) :: operators
Also as far as I know this is easily work-aroundable
with((round (() / ())) * ())
((round (() * ())) / ())
This is the workaround:
(round ((23.565) * (10))) / (10)As an example, that's rounding to the tens place. This suggestion is mostly just to make it easier, and I find a single block easier than the workaround.
Last edited by EIephant_Lover (July 10, 2019 21:28:59)