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

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

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

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

        return new static($result);
    }
public function abs ( ) : Vector { $ result = [ ] ; foreach ( $ this -> components as $ i => $ component ) { $ result [ $ i ] = abs ( $ component ) ; } return new static ( $ result ) ; }
Returns the absolute value of this Vector as a new Vector instance.

@return  Vector
Returns the absolute value of this Vector as a new Vector instance .