SassNumber::op_minus PHP Method

op_minus() public method

Subtracts the value of other from this value
public op_minus ( $other ) : mixed
return mixed SassNumber if other is a SassNumber or SassColour if it is a SassColour
    public function op_minus($other)
    {
        if ($other instanceof SassColour) {
            return $other->op_minus($this);
        } elseif (!$other instanceof SassNumber) {
            throw new SassNumberException('Number must be a number', SassScriptParser::$context->node);
        } else {
            $other = $this->convert($other);
            return new SassNumber($this->value - $other->value . $this->units);
        }
    }