halogenandtoast / alchemist

A scientific conversion library.
155 stars 28 forks source link

Conversion is not performed for arithmetic on items of different units. #25

Closed kindrowboat closed 11 years ago

kindrowboat commented 11 years ago

Example: 5.meter + 2.inches returns 7.meters.

I think either the second operand should be converted to the units of the first, or an exception should be raised.

halogenandtoast commented 11 years ago

Yeah I'd consider this a bug I introduced. I've fixed this for addition and subtraction on master. I'll handle multiplication and division seperately.