cooler-king / quantity

A package to make it easy to work with physical quantities.
MIT License
19 stars 4 forks source link

Incorrect Information constructor #30

Closed osechet closed 4 years ago

osechet commented 4 years ago

The Information constructor always sets the unit to Information.bits.

When calling it with bytes, it considers the value to be bits:

dynamic v = Information(B: 1);
print(v);
-> 1 bit

The expected result here is 8 bit.

cooler-king commented 4 years ago

Fixed in quantity 1.0.0 published Oct 6.