# File lib/eymiha/units/numeric_with_units.rb, line 78
    def <=>(value)
      if derived?
        reduce <=> value
      elsif value.kind_of? NumericWithUnits
        if value.derived?
          self <=> value.reduce
        else
          align(value).numeric <=> value.numeric
        end
      elsif value.kind_of? Numeric
        numeric <=> value
      else
        raise UnitsException.new("units mismatch")
      end
    end