operator * method
Returns the product of this dimension and other.
Implementation
Dimension operator *(Dimension other) {
if (isEmpty) return other;
if (other.isEmpty) return this;
DimDef def = this.def;
for (var e in other._def.entries) {
def.update(e.key, (v) => v + e.value, ifAbsent: () => e.value);
}
return Dimension(def);
}