From e7ad733c81aa7f1e5c08da83a89c254cdcefce1d Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sun, 30 Jul 2017 21:12:50 -0700 Subject: [PATCH] Move OP_CARET back into place. --- .../nwapw/abacus/plugin/StandardPlugin.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java b/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java index 42b8355..e29f8f1 100755 --- a/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java +++ b/src/main/java/org/nwapw/abacus/plugin/StandardPlugin.java @@ -98,6 +98,17 @@ public class StandardPlugin extends Plugin { }*/ } }); + public static final Operator OP_CARET = new Operator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 2, new Function() { + @Override + protected boolean matchesParams(NumberInterface[] params) { + return params.length == 2; + } + + @Override + protected NumberInterface applyInternal(NumberInterface[] params) { + return FUNCTION_EXP.apply(FUNCTION_LN.apply(params[0]).multiply(params[1])); + } + }); public static final Function FUNCTION_ABS = new Function() { @Override protected boolean matchesParams(NumberInterface[] params) { @@ -199,17 +210,6 @@ public class StandardPlugin extends Plugin { return sum; } }; - public static final Operator OP_CARET = new Operator(OperatorAssociativity.RIGHT, OperatorType.BINARY_INFIX, 2, new Function() { - @Override - protected boolean matchesParams(NumberInterface[] params) { - return params.length == 2; - } - - @Override - protected NumberInterface applyInternal(NumberInterface[] params) { - return FUNCTION_EXP.apply(FUNCTION_LN.apply(params[0]).multiply(params[1])); - } - }); public static final Function FUNCTION_SQRT = new Function() { @Override protected boolean matchesParams(NumberInterface[] params) {