operator - method

Dim operator -(
  1. Dim other
)

Subtracts another dimension with same unit from this dimension.

Implementation

Dim operator -(Dim other) {
  if (value == null || other.value == null || other.unit != unit) return this;
  return Dim(value! - other.value!, unit: unit, important: important);
}