Duckle29 / EEValue

A small python module to format floats in EE ways :)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EEValues

Test and package A simple class for dealing with engieering values

Will print with Si prefix, and has an easy method to get the closest E-series value.

>>> from eevalue import EEValue as EEV
>>> R = EEV(18.91)
>>> str(R.E(48, "ceil"))
19.60
>>> str(EEV(17950.10).E(192,"floor"))
17.80 k
>>> str(EEV('2u2') * 2)
4.40 µ
>>> str(EEV('2K1234', precision=4) * 2)
4.2468 k

About

A small python module to format floats in EE ways :)

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%