SassNumber::op_times PHP Method

op_times() public method

Multiplies this value by the value of other
public op_times ( $other ) : mixed
return mixed SassNumber if other is a SassNumber or SassColour if it is a SassColour
    public function op_times($other)
    {
        if ($other instanceof SassColour) {
            return $other->op_times($this);
        } elseif (!$other instanceof SassNumber) {
            throw new SassNumberException('Number must be a number', SassScriptParser::$context->node);
        } else {
            return new SassNumber($this->value * $other->value . $this->unitString(array_merge($this->numeratorUnits, $other->numeratorUnits), array_merge($this->denominatorUnits, $other->denominatorUnits)));
        }
    }