tiffany352 / rink-rs

Unit conversion tool and library written in rust
https://rinkcalc.app/about
GNU General Public License v3.0
442 stars 28 forks source link

Bits and Bytes all treated as bits #56

Open 0x85C opened 4 years ago

0x85C commented 4 years ago

Hi,

There is some odd behavior between bits and bytes, (i.e. GB, Gb, GiB) all being treated as the same unit and converted to bit, where the 3 units are distinctively different units.

Example: "5 bytes" becomes "40 bit" "800GB" becomes "6.4 terrabit"

Also as a side note "TB" is recognized as a terrabyte/bit, however "Tb" comes up as a tablespoon. Maybe tablespoon can be changed to "tb" so that "TB" can be consistently used, similarly to gigabytes in the following different units (TB, Tb, TiB).

passcod commented 1 year ago

Ran into that today.

In general it would be nice if the units would stay within their "cohort" unless I ask for conversion or op with other units. Like

38 kilobytes * 100 * 365
= 1.4235 gigabyte

400 pounds * 1.5
= 600 pound

instead of

38 kilobytes * 100 * 365
= 11.096 gigabit

400 pounds * 1.5
= 272.1554 kilogram