vrtulka23/scinumtools

Implement system unit arithmetics

vrtulka23 opened this issue · 2 comments

Following operations should be implemented:

>>> 23 * AU.Length
Quantity(2.300e+01 #ALEN)
>>> Quantity(23, 's-1') * AU.Length
Quantity(2.300e+01 #ALEN*s-1)

System of units are now classes that return Quantity objects.
So now, the above calculations can be done as with any other Quantity objects.

>>> 23 * AU.Length()
Quantity(2.300e+01 #ALEN)
>>> Quantity(23, 's-1') * AU.Length()
Quantity(2.300e+01 s-1*#ALEN)

finished