@meld-ts/core
    Preparing search index...

    Function decimalAdjust

    • 数字精度调整(底层函数)

      使用 e-notation 移位法避免浮点精度问题。

      Parameters

      • type: "round" | "ceil" | "floor"

        — 调整类型:'round' 四舍五入 / 'ceil' 向上取整 / 'floor' 向下取整

      • value: number

        — 要调整的数值

      • Optionalexp: number

        — 指数(10 的 exp 次方)。0=个位,1=十位,-1=小数点后 1 位,-2=小数点后 2 位,以此类推。 传 undefined0 时退化为原生 Math[type]

      Returns number

      调整后的数值;若 value 为 NaN 或 exp 不是整数则返回 NaN