1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-12-23 07:50:09 -08:00

Fix bug causing an NPE when sqrt() was called.

This commit is contained in:
Danila Fedorin 2017-07-27 19:30:40 -07:00
parent d9df565a42
commit df0b1829ff

View File

@ -6,9 +6,6 @@ import org.nwapw.abacus.function.OperatorAssociativity;
import org.nwapw.abacus.number.NaiveNumber; import org.nwapw.abacus.number.NaiveNumber;
import org.nwapw.abacus.number.NumberInterface; 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; import java.util.function.BiFunction;
/** /**
@ -231,7 +228,7 @@ public class StandardPlugin extends Plugin {
@Override @Override
protected NumberInterface applyInternal(NumberInterface[] params) { 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)));
} }
}); });
} }