1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-11-17 16:09:32 -08:00

Rename getPi to piFor.

This commit is contained in:
Danila Fedorin 2017-08-06 21:56:49 -07:00
parent 2c40387e03
commit 402867171c
2 changed files with 3 additions and 3 deletions

View File

@ -139,7 +139,7 @@ public abstract class Plugin {
* @param forClass the class to which to find the pi instance. * @param forClass the class to which to find the pi instance.
* @return the pi value for the given class. * @return the pi value for the given class.
*/ */
protected final NumberInterface getPi(Class<? extends NumberInterface> forClass) { protected final NumberInterface piFor(Class<? extends NumberInterface> forClass) {
return manager.piFor(forClass); return manager.piFor(forClass);
} }

View File

@ -358,7 +358,7 @@ public class StandardPlugin extends Plugin {
@Override @Override
protected NumberInterface applyInternal(NumberInterface[] params) { protected NumberInterface applyInternal(NumberInterface[] params) {
NumberInterface pi = getPi(params[0].getClass()); NumberInterface pi = piFor(params[0].getClass());
NumberInterface twoPi = pi.multiply(new NaiveNumber(2).promoteTo(pi.getClass())); NumberInterface twoPi = pi.multiply(new NaiveNumber(2).promoteTo(pi.getClass()));
NumberInterface theta = getSmallAngle(params[0], pi); NumberInterface theta = getSmallAngle(params[0], pi);
//System.out.println(theta); //System.out.println(theta);
@ -382,7 +382,7 @@ public class StandardPlugin extends Plugin {
@Override @Override
protected NumberInterface applyInternal(NumberInterface[] params) { protected NumberInterface applyInternal(NumberInterface[] params) {
return functionSin.apply(getPi(params[0].getClass()).divide(new NaiveNumber(2).promoteTo(params[0].getClass())) return functionSin.apply(piFor(params[0].getClass()).divide(new NaiveNumber(2).promoteTo(params[0].getClass()))
.subtract(params[0])); .subtract(params[0]));
} }
}; };