class Sass::Script::Value::Number
def mod(other)
-
(Sass::UnitConversionError)
- if `other` has incompatible units -
(NoMethodError)
- if `other` is an invalid type
Returns:
-
(Number)
- This number modulo the other
Parameters:
-
other
(Number
) -- The right-hand side of the operator
def mod(other) if other.is_a?(Number) return Number.new(Float::NAN) if other.value == 0 operate(other, :%) else raise NoMethodError.new(nil, :mod) end end