mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-11 17:45:20 +00:00
Implement unary operators.
This commit is contained in:
@@ -89,7 +89,7 @@ public class StandardPlugin extends Plugin {
|
||||
}
|
||||
}));
|
||||
|
||||
registerFunction("!", new Function() {
|
||||
registerOperator("!", new Operator(OperatorAssociativity.RIGHT, OperatorType.UNARY_POSTFIX, 0, new Function() {
|
||||
//private HashMap<Class<? extends NumberInterface>, ArrayList<NumberInterface>> storedList = new HashMap<Class<? extends NumberInterface>, ArrayList<NumberInterface>>();
|
||||
@Override
|
||||
protected boolean matchesParams(NumberInterface[] params) {
|
||||
@@ -114,7 +114,7 @@ public class StandardPlugin extends Plugin {
|
||||
storedList.get(params[0].getClass()).add(NaiveNumber.ONE.promoteTo(params[0].getClass()));
|
||||
}*/
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
registerFunction("abs", new Function() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user