decimal_precisions 0.0.1 copy "decimal_precisions: ^0.0.1" to clipboard
decimal_precisions: ^0.0.1 copied to clipboard

Configurable precision calculation tool

精度计算工具 #

处理不同情况下的精度计算 #

enum Type {
rounding, //四舍五入
tailRemoval, //去尾
enter, //逢N进1
}

使用:

输入的具体数值(支持小数和整数)number
进制类型 type
保留小数位数 digit
在类型为enter的时候 大于等于value进1 value
PrecisionsUtil.getPrecisionsDouble(number: number,type: Type.enter,digit: digit,value:value);
1
likes
105
pub points
25%
popularity

Publisher

unverified uploader

Configurable precision calculation tool

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

decimal, flutter

More

Packages that depend on decimal_precisions