A quantity is castable to another one with the same unit if the value type can be casted to the new one.
For converting a quantity to another unit, see convert instead.
auto a = 2.0 * metre; assert(cast(Quantity!(metre, int))a == 2 * metre);
See Implementation
A quantity is castable to another one with the same unit if the value type can be casted to the new one.
For converting a quantity to another unit, see convert instead.