• Beta

    Limit precision.

    Reduces number of decimals but does not insist on those decimals to be there.

    Parameters

    • number: number

      Number to adjust

    • Optionaldecimals: number = 2

      Maximum number of decimals

    • Optionalmethod: "round" | "floor" | "ceil" = "floor"

      Rounding method.

    Returns number

    • Adjusted number