-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement exponential operator (**) to GDScript/Expressions #58873
Conversation
Aah, I wish ^ wasn't reserved for the Bitwise XOR in GDScript, too. It would've been a nice opportunity to make it closer to the mathematical symbol, but I do digress. Because of Python's influence, would it mean that, should this PR get merged, the Floor Division operator would be added, as well? |
Well, if the community have an interest in it - then why not? But as a proposal its better to be shown on the godotengine/godot-proposals first. |
2ad79ee
to
e0e99bd
Compare
Never mind about the Floor Division proposal. As a point of reference, it didn't go so well last time. |
Ah, I see. Than maybe it may be a source of confusion and not so needed for games as for the python developers. |
2241159
to
6f7bb4b
Compare
Variant already provides the pow() function as builtin method. I would not add this to Variant as its more bloat. It can be simply syntax sugar in Expression and GDScript that ends up calling pow() internally. |
eed3698
to
9110ad3
Compare
@reduz To be honest without adding it to Variant is much more "bloating" to do rather than otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with reduz that this addition duplicates the pow function and adds confusion.
123327c
to
4821831
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, there's just a stray modules/gdnative
that got re-added and should be removed.
@akien-mga Done, I've removed it! |
Thanks! |
Added a support for pow operator to GDScript and Expressions:
Closes godotengine/godot-proposals#1045
Closes godotengine/godot-proposals#1580