Skip to content
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

support ^ operator with (double,double) arguments #52

Open
ghost opened this issue Oct 15, 2017 · 2 comments
Open

support ^ operator with (double,double) arguments #52

ghost opened this issue Oct 15, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 15, 2017

it should map to Math.pow(double,double) etc... or does this already work somehow?

@StefanLobbenmeier
Copy link

StefanLobbenmeier commented Nov 13, 2019

Sorry for answering on such an old issue.
The operator ^ is already used in java for bitwise xor. Example:

        assert (true ^ false) == true;
        assert (true ^ true) == false;
        assert (0b1111 ^ 0b0100) == 0b1011;

For double and float this operator currently does not apply. Still adding this (besides the question whether this is doable) will lead to confusion, so I would not like having this.

In python there is a different operator (**) that is used for exponentiation. Adding this to java might make sense, although I am not sure if this can be done by this plugin.

@StefanLobbenmeier
Copy link

I just checked the code - my first guess would be to add an operator to the map here

and check if it "just works".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant