convert method
Returns a copy of this number, converted to the units represented by
newNumerators
and newDenominators
.
Note that convertValue is generally more efficient if the value is going to be accessed directly.
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 $
). It's used for error reporting.
Implementation
SassNumber convert(List<String> newNumerators, List<String> newDenominators,
[String? name]) =>
SassNumber.withUnits(convertValue(newNumerators, newDenominators, name),
numeratorUnits: newNumerators, denominatorUnits: newDenominators);