Description
There has been a long running suggestions topic on adding an exponents block which has been open since 2013 (over a decade now). Generally speaking, there hasn't been many major additions to Scratch 3 for quite a long time now, however, I feel that this would be a nice one to get done, since it's a popular, and relatively simple to implement, suggestion.
Justification
Many have suggested mathematical workarounds to this kind of block, however, they're often more complicated to setup, someone who learned about squaring and cubing for the first time may not be able to figure it out on their own. While this isn't a major issue for more complicated math, when it comes to simple math like exponents, that shouldn't be something that should need to be done.
Implementation details
JavaScript provides 2 main ways of computing a exponents. Either its builtin exponent operator (**
) can be used or the Math.pow
function can be used instead.
Likely implicated repositories
A new block would likely require pull requests across repositories, however, as the implementation code would need to go here, I decided to create this issue here.
Assignment
I think I understand enough about working in the Scratch codebase to be able to create the block for this, and to create tests for it. I would appreciate an assignment to this issue.
On second thought, maybe not. I do have a patch file I could send here in the case that there'd be interest in continuing my work here (please make sure to attribute me as a co-author if you do, though), but I probably won't be sending a PR, since I have other priorities ATM.