math/Vector.php
public function reverse()
    {
        $result = [];

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

        return new static($result);
    }
public function reverse()
    {
        $result = [];

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

        return new static($result);
    }
public function reverse ( ) { $ result = [ ] ; foreach ( $ this -> components as $ i => $ component ) { $ result [ $ i ] = $ component * - 1 ; } return new static ( $ result ) ; }
Reverses the direction of this Vector.

@return  Vector
Reverses the direction of this Vector .