public class NumberFunctions
extends java.lang.Object
Standard library specification| Constructor and Description |
|---|
NumberFunctions()
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Decimal |
abs(ExecutionContext ctx,
Decimal number)
Returns the absolute value of the
number. |
Decimal |
max(ExecutionContext ctx,
Decimal... values)
Computes max long from all passed long
|
Decimal |
min(ExecutionContext ctx,
Decimal... values)
Computes min long from all passed long
|
Decimal |
random()
Returns a pseudorandom, uniformly distributed decimal value between 0.0 (inclusive) and 1.0
(exclusive).
|
Decimal |
random(ExecutionContext ctx,
Decimal upperBound)
Returns a pseudorandom, uniformly distributed decimal value between 0 (inclusive) and the
upperBound (exclusive).
|
Decimal |
roundCeiling(ExecutionContext ctx,
Decimal number)
Returns rounding of the number towards positive infinity.
|
Decimal |
roundDown(ExecutionContext ctx,
Decimal number)
Returns rounding of the number towards zero.
|
Decimal |
roundFloor(ExecutionContext ctx,
Decimal number)
Returns rounding of the number towards negative infinity.
|
Decimal |
roundHalfDown(ExecutionContext ctx,
Decimal number)
Returns rounding of the number towards the nearest neighbour, if both neighbors are
equidistant, rounds down.
|
Decimal |
roundHalfEven(ExecutionContext ctx,
Decimal number)
Returns rounding of the number towards the nearest neighbour, if both neighbors are
equidistant, rounds towards the even neighbor.
|
Decimal |
roundHalfUp(ExecutionContext ctx,
Decimal number)
Returns rounding of the number towards the nearest neighbour, if both neighbors are
equidistant, rounds up.
|
Decimal |
roundUp(ExecutionContext ctx,
Decimal number)
Returns rounding of the number away from zero.
|
Decimal |
scale(ExecutionContext ctx,
Decimal number)
Returns the scale of the number.
|
public Decimal min(ExecutionContext ctx, Decimal... values) throws ErrorException
ctx - values - ErrorExceptionpublic Decimal max(ExecutionContext ctx, Decimal... values) throws ErrorException
ctx - values - ErrorExceptionpublic Decimal abs(ExecutionContext ctx, Decimal number) throws ErrorException
number.ctx - number - numberErrorExceptionpublic Decimal roundFloor(ExecutionContext ctx, Decimal number) throws ErrorException
ctx - number - ErrorExceptionpublic Decimal roundCeiling(ExecutionContext ctx, Decimal number) throws ErrorException
ctx - number - ErrorExceptionpublic Decimal roundDown(ExecutionContext ctx, Decimal number) throws ErrorException
ctx - number - ErrorExceptionpublic Decimal roundUp(ExecutionContext ctx, Decimal number) throws ErrorException
ctx - number - ErrorExceptionpublic Decimal roundHalfDown(ExecutionContext ctx, Decimal number) throws ErrorException
ctx - number - ErrorExceptionpublic Decimal roundHalfEven(ExecutionContext ctx, Decimal number) throws ErrorException
ctx - number - ErrorExceptionpublic Decimal roundHalfUp(ExecutionContext ctx, Decimal number) throws ErrorException
ctx - number - ErrorExceptionpublic Decimal scale(ExecutionContext ctx, Decimal number) throws ErrorException
ctx - number - ErrorExceptionpublic Decimal random()
public Decimal random(ExecutionContext ctx, Decimal upperBound) throws ErrorException
ctx - upperBound - ErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.