Skip to content

Commit

Permalink
Fix bug causing an NPE when sqrt() was called.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanilaFe committed Jul 28, 2017
1 parent 2cc4bd1 commit c9fad36
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/org/nwapw/abacus/plugin/StandardPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
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;

/**
Expand Down Expand Up @@ -231,7 +228,7 @@ protected boolean matchesParams(NumberInterface[] params) {

@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)));
}
});
}
Expand Down

0 comments on commit c9fad36

Please sign in to comment.