Closed liuyxpp closed 2 months ago
This is the difference between one and oneunit. See https://docs.julialang.org/en/v1/base/numbers/#Base.oneunit
If you want a quantity that is of the same type as x, or of type T, even if x is dimensionful, use oneunit instead.
The way these are defined is that one
is a multiplicative identity and zero
is an additive identity. This is why one
does not have units.
@liuyxpp on #136 you can find an alternative dimensions type that permits zero(::Type)
Example below:
I wonder why dimensions for the results of
zero
andone
functions are different. Is it intentional or a bug?