Open ghost opened 7 years ago
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.
I just checked the code - my first guess would be to add an operator to the map here https://github.com/amelentev/java-oo/blob/ea44e927c01d8d228c7e193ceda7b4735eceb584/javac-oo-plugin/src/main/java/javaoo/OOMethods.java#L36
and check if it "just works".
it should map to Math.pow(double,double) etc... or does this already work somehow?