partial implementation FLOOR.MATH function (needs more testing and bad param support)

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901172 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-05-23 13:53:56 +00:00
parent 176f64cfe3
commit 769fc25e64
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@
package org.apache.poi.ss.formula.functions;
import org.apache.poi.ss.util.NumberToTextConverter;
import org.apache.poi.util.Internal;
import java.math.BigDecimal;
import java.math.RoundingMode;
@ -273,6 +274,7 @@ final class MathX {
}
}
@Internal
public static double scaledRoundUsingBigDecimal(double xval, double multiplier, RoundingMode mode) {
BigDecimal multiplierDecimal = BigDecimal.valueOf(multiplier);
BigDecimal bd = BigDecimal.valueOf(xval).divide(multiplierDecimal)