Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1007 Bytes

README.md

File metadata and controls

38 lines (25 loc) · 1007 Bytes

autorounddecimal

Build Status Downloads Version

auto round decimal

Usage

python

from autorounddecimal.core import adround

adround(0.00032001)     ;;=> 0.00032001
adround(0.0003200001)   ;;=> 0.00032
adround(0.000319999)    ;;=> 0.00032


adround(3.2001)     ;;=> 3.2001
adround(3.200001)   ;;=> 3.2
adround(3.19999)    ;;=> 3.2

adround(3.20000123)               ;;=> 3.2
adround(3.20000123, min_count=4)   ;;=> 3.2
adround(3.20000123, min_count=5)   ;;=> 3.20000123
adround(3.200000123, min_count=5)   ;;=> 3.2
adround(3.200000123, min_count=6)   ;;=> 3.200000123

Installation

$ pip install autorounddecimal