split method
Splits this measure into the provided compatible units.
Implementation
Map<Unit<D>,num> split(Set<Unit<D>> units) {
var res = <Unit<D>,num>{};
var val = unit.converter.apply(this.val);
for (var u in units.where((u) => u.isCompatible(unit))) {
var v = (val / u.value).truncate();
val -= v * u.value;
res[u] = v;
}
return res;
}