Hello,
First of all thank you for this fantastic package.
I noticed a surprising behavior. (1:10)*m is a UnitRange, as are (1:10)mm and (1:10)ms, but (1:10)m/s is a Vector. (1:10)(m/s) is on the other hand still a UnitRange.
For some reason when the Range is divided by a unit it becomes a Vector. This does not happen for multiplication. Is this the desired behavior?
One reason this matters is for display, since Vectors don't avail themselves to a nice show method:
julia> show((1:10)*(m/s))
(1:10) m s⁻¹
julia> show((1:10)*m/s)
Quantity{Int64, 𝐋 𝐓⁻¹, Unitful.FreeUnits{(m, s⁻¹), 𝐋 𝐓⁻¹, nothing}}[1 m s⁻¹, 2 m s⁻¹, 3 m s⁻¹, 4 m s⁻¹, 5 m s⁻¹, 6 m s⁻¹, 7 m s⁻¹, 8 m s⁻¹, 9 m s⁻¹, 10 m s⁻¹]
Hello,
First of all thank you for this fantastic package.
I noticed a surprising behavior. (1:10)*m is a UnitRange, as are (1:10)mm and (1:10)ms, but (1:10)m/s is a Vector. (1:10)(m/s) is on the other hand still a UnitRange.
For some reason when the Range is divided by a unit it becomes a Vector. This does not happen for multiplication. Is this the desired behavior?
One reason this matters is for display, since Vectors don't avail themselves to a nice show method:
julia> show((1:10)*(m/s))
(1:10) m s⁻¹
julia> show((1:10)*m/s)
Quantity{Int64, 𝐋 𝐓⁻¹, Unitful.FreeUnits{(m, s⁻¹), 𝐋 𝐓⁻¹, nothing}}[1 m s⁻¹, 2 m s⁻¹, 3 m s⁻¹, 4 m s⁻¹, 5 m s⁻¹, 6 m s⁻¹, 7 m s⁻¹, 8 m s⁻¹, 9 m s⁻¹, 10 m s⁻¹]