Added true and false constants to the expression parser.

This commit is contained in:
TomyLobo 2011-11-02 15:29:55 +01:00
parent c2cd587a9b
commit a51bc28756

View File

@ -73,6 +73,8 @@ public class Expression {
this.variableNames = variableNames;
variables.put("e", new Constant(-1, Math.E));
variables.put("pi", new Constant(-1, Math.PI));
variables.put("true", new Constant(-1, 1));
variables.put("false", new Constant(-1, 0));
for (String variableName : variableNames) {
variables.put(variableName, new Variable(0));
}