Class AbsFunction


  • public class AbsFunction
    extends FunctionBase
    Returns the absolute value of the number parameter, i.e. if the number is negative, it returns the positive value.

    http://docs.jsonata.org/numeric-functions.html
    $abs(number)
    If number is not specified (i.e. this function is invoked with no arguments), then the context value is used as the value of number.

    Examples:
    $abs(5)==5
    $abs(-5)==5

    NOTE: FROM THE java.math::abs() FUNCTION JAVADOC:
    Note that if the argument is equal to the value of Long.MIN_VALUE, the most negative representable long value, the result is that same value, which is negative.