Package dev.frostlake.functions.scalar.math


package dev.frostlake.functions.scalar.math
  • Classes
    Class
    Description
    ABS(n) — the absolute value of the numeric input, computed exactly over BigDecimal so a fixed-point argument keeps its scale.
    ACOS(x) — inverse cosine in radians.
    ACOSH(x) — inverse hyperbolic cosine, computed as ln(x + sqrt(x*x - 1)) since Math has no acosh.
     
    ASINH(x) — inverse hyperbolic sine, computed as ln(x + sqrt(x*x + 1)) since Math has no asinh.
     
     
    ATANH(x) — inverse hyperbolic tangent, computed as 0.5 * ln((1 + x) / (1 - x)) since Math has no atanh.
     
    BITCOUNT(n) — the number of set bits in the integer value.
     
     
     
     
    The whole number a bitwise function reads an argument as.
     
     
    CEIL(n [, scale]) — the input rounded UP, to whole numbers by default and to scale decimal places when one is given.
     
     
     
     
    DIV0(a, b) divides like the / operator but returns 0 when the divisor is 0.
     
     
    FLOOR(n [, scale]) — the input rounded DOWN, to whole numbers by default and to scale decimal places when one is given.
    GETBIT(integer_expr, bit_position) — the value (0 or 1) of the bit at the 0-based bit_position, counting from the least significant bit.
     
     
     
     
    NEGATE(n) — the negative of the numeric input.
     
     
     
     
    RANDOM([seed]) — a pseudo-random signed 64-bit integer (not a fraction in [0, 1)).
    ROUND(n [, scale [, mode]]) — the input rounded to scale decimal places, zero by default.
    The words ROUND's optional third argument takes.
     
     
     
     
     
     
     
     
    UNIFORM(min, max [, gen]) — a uniformly random value in the range.
    WIDTH_BUCKET(value, min, max, count) — which of count equal buckets between min and max the value falls in, 0 below the range and count + 1 above it.