Keno / SIUnits.jl

Efficient unit-checked computation
Other
70 stars 26 forks source link

Fix comparisons to numbers and among units of different types #15

Closed timholy closed 10 years ago

timholy commented 10 years ago

Prior to this,

julia> 1m<2kg
true

Also, since currently type inference yields

r = 1.0m./[1m,2m]
julia> typeof(r[1])
SIQuantity{Float64,0,0,0,0,0,0,0} (constructor with 1 method)

(even when inside a function), it's important to have comparisons between plain numbers and objects of type SIQuantity{Float64,0,0,0,0,0,0,0}.

Keno commented 10 years ago

Fails on 0.2 (see Travis). Can you have a look?

timholy commented 10 years ago

It was the usual change-in-convert-behavior-in-constructors problem. It passes for both locally, let's see what the Travis build says.

Keno commented 10 years ago

Thanks!