Conversation
|
All contributors have signed the CLA ✍️ ✅ |
This comment was marked as resolved.
This comment was marked as resolved.
|
this would be great to add! |
|
This has been highly requested on the Scratch Forums for years. It would be a major long-awaited addition to the Scratch editor should it be merged. In fact, it was first suggested in 2013. Please merge it! |
|
This is a great addition, I think a lot of people would appreciate it. |
|
There are so many amazing projects that could be created with this, but are currently too tedious to do with workarounds (even the best ones have imprecision and are just too complicated). Scratch has its fair share of beginner and advanced features, and merging this costs nothing... please add this block! |
|
I think the block looks a bit strange in the topmost group - all other block groups have at most 4 blocks in them. I've seen a suggestion that I think puts the block to a better position: https://scratch.mit.edu/discuss/post/8998382/ |
I partially disagree with this, the fact that all of the other block categories don’t have over 4 blocks in their first group, makes me want to move the block down to right above the @cwillisf What’s your thoughts on this? |
See also scratchfoundation/scratch-blocks#3462
Resolves
#426
Proposed Changes
Add a new block to the Operator category to raise a given number to a power of another given number.
Reason for Changes
This is a highly requested block by many Scratchers and Scratch Team members (I have with some [1,2], and they agree that it should exist in Scratch). There also aren't any accurate workarounds, besides ones that are crazy inefficient, making this block even more important to have.
It has been discussed in multiple topics and issues, and they always end up with tons of upvotes and supports.
The one thing I would like to discuss is whether, zero to the power of zero, should return
1orNaN. Currently, it returns1, as that is what the native JavaScript operator returns. This might confuse younger Scratchers, but then again, I don't know ifNaNis such a good idea either, since it acts as zero in scratch, making some math equations with the power operator return an incorrect result.Test Coverage
Tested locally:
