Keno / SIUnits.jl

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

RFC: one(x::SIQuantity{T}) returns T #34

Closed tomasaschan closed 10 years ago

tomasaschan commented 10 years ago

In some discussion in #18 that happened after #30 was merged, it was suggested that one(x::SIQuantity) should return a basic number type (i.e. the result of one(x.val)) rather than an SIQuantity. This PR changes that, and adds a few tests.

I'm not 100% certain this behavior is better than the previous, but at least this way it's easy to compare them, and this PR can serve as the basis for a concious decision.