convertValueToMatch method

double convertValueToMatch(
  1. SassNumber other, [
  2. String? name,
  3. String? otherName
])

Returns value, converted to the same units as other.

Throws a SassScriptException if this number's units aren't compatible with other's units, or if either number is unitless but the other is not.

If this came from a function argument, name is the argument name (without the $) and otherName is the argument name for other. These are used for error reporting.

Implementation

double convertValueToMatch(SassNumber other,
        [String? name, String? otherName]) =>
    _coerceOrConvertValue(other.numeratorUnits, other.denominatorUnits,
        coerceUnitless: false,
        name: name,
        other: other,
        otherName: otherName);