public final class PercentRank extends java.lang.Object implements Function
array The array or range of data with numeric values that defines relative standing.
X The value for which you want to know the rank.
significance Optional. A value that identifies the number of significant digits for the returned percentage value.
If omitted, PERCENTRANK uses three digits (0.xxx).
Returns a number between 0 and 1 representing a percentage.
Modifier and Type | Method and Description |
---|---|
ValueEval |
evaluate(ValueEval[] args,
int srcRowIndex,
int srcColumnIndex) |
static java.util.List<ValueEval> |
getValues(ValueEval eval,
int srcRowIndex,
int srcColumnIndex) |
static NumberEval |
interpolate(double x,
double closestMatchBelow,
double closestMatchAbove,
NumberEval belowRank,
NumberEval aboveRank,
int significance) |
static double |
round(java.math.BigDecimal bd,
int significance) |
public static final Function instance
public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex)
evaluate
in interface Function
args
- the evaluated function arguments. Empty values are represented with
BlankEval
or MissingArgEval
, never null
.srcRowIndex
- row index of the cell containing the formula under evaluationsrcColumnIndex
- column index of the cell containing the formula under evaluationErrorEval
, never null
.
Note - Excel uses the error code #NUM! instead of IEEE NaN, so when
numeric functions evaluate to Double.NaN
be sure to translate the result to ErrorEval.NUM_ERROR
.@Internal public static NumberEval interpolate(double x, double closestMatchBelow, double closestMatchAbove, NumberEval belowRank, NumberEval aboveRank, int significance)
@Internal public static double round(java.math.BigDecimal bd, int significance)
@Internal public static java.util.List<ValueEval> getValues(ValueEval eval, int srcRowIndex, int srcColumnIndex) throws EvaluationException
EvaluationException
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.