math/Vector.php
public function multiply(float $scale) : Vector
    {
        $result = [];

        foreach ($this->components as $i => $component) {
            $result[$i] = $component * $scale;
        }

        return new static($result);
    }
public function multiply(float $scale) : Vector
    {
        $result = [];

        foreach ($this->components as $i => $component) {
            $result[$i] = $component * $scale;
        }

        return new static($result);
    }
public function multiply ( float $ scale ) : Vector { $ result = [ ] ; foreach ( $ this -> components as $ i => $ component ) { $ result [ $ i ] = $ component * $ scale ; } return new static ( $ result ) ; }
Multiplies the Vector by the given scale and returns the result as a new Vector.

@param   float   $scale  The scale to multiply by.
@return  Vector          The result of the multiplication.
Multiplies the Vector by the given scale and returns the result as a new Vector .