Discuss Scratch
- Discussion Forums
- » Suggestions
- » Advanced mathematical calculations!
- IndexErrorException
-
Scratcher
500+ posts
Advanced mathematical calculations!
Alot of real programming languages have multi input mathematical functions.

Some of the could be:
atan2
min (returns the smallest value between the two number inputs)
max (returns the largest value between the two number inputs)
exponent or ^

Some of the could be:
atan2
min (returns the smallest value between the two number inputs)
max (returns the largest value between the two number inputs)
exponent or ^
- plqaokwsijeduhrfyg
-
Scratcher
500+ posts
Advanced mathematical calculations!
Support,
These might actually be useful for people who actually understand what these things do.
These might actually be useful for people who actually understand what these things do.
- IDontNoWatIAm
-
Scratcher
500+ posts
Advanced mathematical calculations!
Support, could be used in those big mathy projects that usually have pen, or for more simpler usage like someone making a calculator
now to wait for someone to say no support because it's too complex for new scratchers
now to wait for someone to say no support because it's too complex for new scratchers
- dhfbei8987
-
Scratcher
1000+ posts
Advanced mathematical calculations!
A majority of these are duplicates.
- the2000
-
Scratcher
1000+ posts
Advanced mathematical calculations!
A majority of these are duplicates.The implementation is not, though, and I think that makes this unique enough to warrant its own thread. If someone suggested a "letter 1 of [string]“ reporter and someone else later suggested a ”letter () of [string]“ reporter, the latter would not be a duplicate. One is more flexible, and is therefore a unique suggestion.
I always thought that the single input ”advanced math“ block could use a two-input alternative, and those functions are definitely missing from Scratch right now. If the designers' reason for hesitating on adding these features is that having too many advanced blocks would look scary to new users, then this would clearly fix that problem. (Though I'd argue the modulo operator is more ”scary" than an exponent operator, whatever)
- IndexErrorException
-
Scratcher
500+ posts
Advanced mathematical calculations!
Something like “min” or “max” wouldn't be scary. I mean doesn't abs and sqrt look ‘scary’?
atan2 is just a option. modulus was pretty scary to me in the beginning.
If scratch wants to be a stepping stone to more advanced stuff, it needs to show the stuff they will likely see in the future.
Also think about the how simpler it would be to do things like gets the smallest number or a exponent. I have had a few use cases where a max block would be useful. Think about this:

This would turn something that takes a if statement and a > operator and a set variable to just a set variable and max. To a new scratcher, this may make more sense. Because if the max score is higher than your current score, it will just set it back to the max score. If the current score is higher, it sets the max score to the higher value(current score).
atan2 is just a option. modulus was pretty scary to me in the beginning.
If scratch wants to be a stepping stone to more advanced stuff, it needs to show the stuff they will likely see in the future.
Also think about the how simpler it would be to do things like gets the smallest number or a exponent. I have had a few use cases where a max block would be useful. Think about this:

This would turn something that takes a if statement and a > operator and a set variable to just a set variable and max. To a new scratcher, this may make more sense. Because if the max score is higher than your current score, it will just set it back to the max score. If the current score is higher, it sets the max score to the higher value(current score).
- Jonathan50
-
Scratcher
1000+ posts
Advanced mathematical calculations!
These are straightforward to define in terms of other blocks. Custom reporters would help in this case and also be generally helpful.
That's not to say they can't add this also, though their use isn't extremely frequent and their absence is sort of a learning opportunity, like bharvey explained here regarding Snap!.
That's not to say they can't add this also, though their use isn't extremely frequent and their absence is sort of a learning opportunity, like bharvey explained here regarding Snap!.
Last edited by Jonathan50 (April 4, 2021 08:21:05)
- mybearworld
-
Scratcher
1000+ posts
Advanced mathematical calculations!
That would be a nice one, for example, you could do something like this:
([max v] (1) ([max v] (2) ([max v] (3) (4) ::operators) ::operators)::operators)And ^ is really important…
- fdreerf
-
Scratcher
1000+ posts
Advanced mathematical calculations!
I disagree. Both blocks have the same reasoning, the same function, the same uses, the same drawbacks, they just have a slightly different implementation, and as such the discussion is pretty much identical.A majority of these are duplicates.The implementation is not, though, and I think that makes this unique enough to warrant its own thread. If someone suggested a "letter 1 of [string]“ reporter and someone else later suggested a ”letter () of [string]" reporter, the latter would not be a duplicate. One is more flexible, and is therefore a unique suggestion.
- IndexErrorException
-
Scratcher
500+ posts
Advanced mathematical calculations!
bump, didn't get any attention, I think my post is not a direct dupe due to all the functions being incorporated into one.
- Discussion Forums
- » Suggestions
-
» Advanced mathematical calculations!