Discuss Scratch
- Discussion Forums
- » Suggestions
- » The Round Block Should Be Well-Rounded.
- Scratchifier
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
Having a dropdown would make it cumbersome. Make it like this() rounded to the nearest (1 v) :: operators reporter
() floored to the nearest (1 v) :: operators reporter
() ceilinged to the nearest (1 v) :: operators reporter
Ah, that's a nice idea..
- ChocolatePi
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
Scratch is not a place to have stuff done for you. Pretty soon, people are gonna be suggesting stuff like
when green flag pressed
play tic-tac-toe game
quit
you should do stuff yourself, and if you're too lazy or not smart enough, you don't need it.
…
What I meant is that if you're not smart enough to know a workaround (those new guys and people who just can't ) you probably won't need it in your project.
- Cyoce
-
Scratcher
500+ posts
The Round Block Should Be Well-Rounded.
Alternatively,
(round () to the nearest (1 v) :: operators)Would work just as well. The problem I see with the dropdown is that (a) you can’t support rounding to any number; and (b) changing what it rounds to would be harder, as it wouldn’t accept a number input. Here’s an example of what mine could be used for
define snap cursor to grid of size (s)
go to x: (round (mouse x) to the nearest (s) :: operators) y: (round (mouse y) to the nearest (s) :: operators)
- Scratchifier
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
Alternatively,(round () to the nearest (1 v) :: operators)Would work just as well. The problem I see with the dropdown is that (a) you can’t support rounding to any number; and (b) changing what it rounds to would be harder, as it wouldn’t accept a number input. Here’s an example of what mine could be used fordefine snap cursor to grid of size (s)
go to x: (round (mouse x) to the nearest (s) :: operators) y: (round (mouse y) to the nearest (s) :: operators)
You do realize that I put your suggestion in my OP, right?
- Cyoce
-
Scratcher
500+ posts
The Round Block Should Be Well-Rounded.
Yes, and thanks for that. However, I came up with a different way to format the block that might be less confusing. Then I gave some examples of advantages that my way of doing the block would offer. I was further building on to the concept.Alternatively,(round () to the nearest (1 v) :: operators)Would work just as well. The problem I see with the dropdown is that (a) you can’t support rounding to any number; and (b) changing what it rounds to would be harder, as it wouldn’t accept a number input. Here’s an example of what mine could be used fordefine snap cursor to grid of size (s)
go to x: (round (mouse x) to the nearest (s) :: operators) y: (round (mouse y) to the nearest (s) :: operators)
You do realize that I put your suggestion in my OP, right?
- Scratchifier
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
@Cyoce
Ah, that makes more sense. Personally, I prefer your way, but mine would be easier for beginners to understand… Any ideas on combining yours with words like “to the ones place”, etc?
Ah, that makes more sense. Personally, I prefer your way, but mine would be easier for beginners to understand… Any ideas on combining yours with words like “to the ones place”, etc?
- OmnipotentPotato
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
I support this:
(round (3.14159265) to (4) decimal places :: operators)
- Scratchifier
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
I support this:(round (3.14159265) to (4) decimal places :: operators)
Hmm. Interesting take, however it seems to not have a clear solution, for example Cyoce's block would work for both “31402921039210391” and “3.14029210392031” (Yes, I know that's not pi, I got lazy.
)Would you do “-4” decimal places for large numbers?
- MushroomMan99
-
Scratcher
100+ posts
The Round Block Should Be Well-Rounded.
Support. The workaround takes too long to do and is very easy to mess up.
- Superdoggy
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
Support. The workaround takes too long to do and is very easy to mess up.The workaround is four blocks. xP
- OmnipotentPotato
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
Yeah, you could do negative rounds for large numbers. My theory is that the less drop-downs we have the better. This just lets you have a lot more control. The only problem I see is this:I support this:(round (3.14159265) to (4) decimal places :: operators)
Hmm. Interesting take, however it seems to not have a clear solution, for example Cyoce's block would work for both “31402921039210391” and “3.14029210392031” (Yes, I know that's not pi, I got lazy.)
Would you do “-4” decimal places for large numbers?
(round (3.14159265) to (2.4395) decimal places :: operators)
- Scratchifier
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
Yeah, you could do negative rounds for large numbers. My theory is that the less drop-downs we have the better. This just lets you have a lot more control. The only problem I see is this:I support this:(round (3.14159265) to (4) decimal places :: operators)
Hmm. Interesting take, however it seems to not have a clear solution, for example Cyoce's block would work for both “31402921039210391” and “3.14029210392031” (Yes, I know that's not pi, I got lazy.)
Would you do “-4” decimal places for large numbers?(round (3.14159265) to (2.4395) decimal places :: operators)
Well, I'm sure it would be pretty easy to prevent any other symbols than “-”.
- Flaame
-
Scratcher
100+ posts
The Round Block Should Be Well-Rounded.
I support this
Last edited by sparks (Dec. 28, 2014 19:28:00)
- OmarAhmadKhan
-
Scratcher
8 posts
The Round Block Should Be Well-Rounded.
That would make things SO much easier!!
(round ( __ ) by ( __ ))
- Birdlegs
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
Mm. I realized the workaround a while back and I honestly think it's kinda cool :3
- MegaApuTurkUltra
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
No support
define round (number) to (place)1 for 1s place, 10 for tenths, 100 for hundreths, 0.1 for tens, 0.01 for hundreds, etc
set [result v] to ((round ((number)*(place)))/(place))
- Scratchifier
-
Scratcher
1000+ posts
The Round Block Should Be Well-Rounded.
No supportIK the workarounds, it's just an improvement suggestion.define round (number) to (place)1 for 1s place, 10 for tenths, 100 for hundreths, 0.1 for tens, 0.01 for hundreds, etc
set [result v] to ((round ((number)*(place)))/(place))
- Discussion Forums
- » Suggestions
-
» The Round Block Should Be Well-Rounded.
