Skip to content

Commit

Permalink
Improve code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineJT committed May 3, 2019
1 parent 1c9e16e commit e04f046
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/com/github/antoinejt/jasc/Constants.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.github.antoinejt.jasc;

final class Constants {
static final String VERSION = "0.3.1";
static final String VERSION = "0.3.2";
static final String LAST_UPDATE = "May 3rd 2019";
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void operate(OperationType operation) throws OperandException, Calculator
case MULTIPLICATION: calc = operand[1] * operand[0]; break;
case DIVISION: calc = operand[1] / operand[0]; break;
case MODULO: calc = operand[1] % operand[0]; break;
case POWER: calc = Double.valueOf(Math.pow(operand[1], operand[0])).floatValue(); break;
case POWER: calc = (float) Math.pow(operand[1], operand[0]); break;
default: throw new CalculatorException("The provided operation is not handled!");
}
// I can't imagine how this can happened
Expand Down

0 comments on commit e04f046

Please sign in to comment.