I'm not sure. This the right way to calculate percentage ?
Here's my method
public class percent extends Operation {
@Override
public Value calculate(Value key, Value value) {
//BigDecimal result = key.getValue().divide(Value.hundred, Value.SCALE, BigDecimal.ROUND_UP);
return new Value((key.getValue().divide(value.getValue()).multiply(Value.hundred)));
// return new Value(result);
}
@Override
public String getSymbol() {
return "%";
}
}
**// means doesn't work as well