Discuss Scratch
- Discussion Forums
- » Suggestions
- » Power Operator
- DerpyEyed
-
Scratcher
11 posts
Power Operator
In the Operators tab of scratch, it would be nice if there was a power operator.
This block would return a number; It represents the JavaScript function Math.pow(a, b);
It has two inputs, one for the number and one for the exponent.
It would return the first number to the power of the second number.
It would look like this:
This block would return a number; It represents the JavaScript function Math.pow(a, b);
It has two inputs, one for the number and one for the exponent.
It would return the first number to the power of the second number.
It would look like this:
(pow () () :: operators)
- DaSpudLord
-
Scratcher
1000+ posts
Power Operator
Support for this-
(() ^ ()::operators)I think this would be less confusing.
- DerpyEyed
-
Scratcher
11 posts
Power Operator
Support for this-I thought about it like that, but most of the other operators are copies of the JavaScript versions.(() ^ ()::operators)I think this would be less confusing.
For example the round, and mod operators.
So it would make sense that this one would also copy the JS version.
- Laurcons
-
Scratcher
1 post
Power Operator
Yes, it is a good suggestion. I like that. I don't need this operator right now in my projects, but I like the idea.
- Zekrom01
-
Scratcher
1000+ posts
Power Operator
Support for this-(() ^ ()::operators)I think this would be less confusing.
- stickfiregames
-
Scratcher
1000+ posts
Power Operator
() ^ () is a common way of writing it in many programming languages, so I support it like that. Then again, we have mod not %…Support for this-I thought about it like that, but most of the other operators are copies of the JavaScript versions.(() ^ ()::operators)I think this would be less confusing.
For example the round, and mod operators.
So it would make sense that this one would also copy the JS version.
- DownsGameClub
-
Scratcher
1000+ posts
Power Operator
Support for this-(() ^ ()::operators)I think this would be less confusing.
This. ^^^
…
It would look like this:(pow () () :: operators)
would be too confusing…
In fact, my calculator uses the x^y system… So I guess it would make sense to use @DaSpudLord's idea…
- Paddle2See
-
Scratch Team
1000+ posts
Power Operator
It looks like this is a duplicate topic of this one over here (among others) so I'll close it to keep the conversation from spreading out any further.
Please use the existing topic in the link above.
Please use the existing topic in the link above.
- Discussion Forums
- » Suggestions
-
» Power Operator






