From df0b1829ff779f5b35828e4b5784d3ca7ed72fb0 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Thu, 27 Jul 2017 19:30:40 -0700 Subject: [PATCH] Fix bug causing an NPE when sqrt() was called. --- src/org/nwapw/abacus/plugin/StandardPlugin.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/org/nwapw/abacus/plugin/StandardPlugin.java b/src/org/nwapw/abacus/plugin/StandardPlugin.java index 8ac8a07..01b988e 100755 --- a/src/org/nwapw/abacus/plugin/StandardPlugin.java +++ b/src/org/nwapw/abacus/plugin/StandardPlugin.java @@ -6,9 +6,6 @@ import org.nwapw.abacus.function.OperatorAssociativity; import org.nwapw.abacus.number.NaiveNumber; import org.nwapw.abacus.number.NumberInterface; -import javax.print.attribute.standard.MediaSize; -import java.util.ArrayList; -import java.util.HashMap; import java.util.function.BiFunction; /** @@ -231,7 +228,7 @@ public class StandardPlugin extends Plugin { @Override protected NumberInterface applyInternal(NumberInterface[] params) { - return StandardPlugin.this.getFunction("pow").apply(params[0], (new NaiveNumber(0.5))); + return StandardPlugin.this.getOperator("^").getFunction().apply(params[0], (new NaiveNumber(0.5))); } }); }