math/Vector.php
public function lengthSquared() : float
    {
        static $result;

        // Return the cached result if it's available.
        if ($result !== null) {
            return $result;
        }

        // Compute the square sum.
        $sum = 0;

        foreach ($this->components as $component) {
            $sum += $component * $component;
        }

        return $result = $sum;
    }
public function lengthSquared() : float
    {
        static $result;

        // Return the cached result if it's available.
        if ($result !== null) {
            return $result;
        }

        // Compute the square sum.
        $sum = 0;

        foreach ($this->components as $component) {
            $sum += $component * $component;
        }

        return $result = $sum;
    }
public function lengthSquared ( ) : float { static $ result ; // Return the cached result if it's available. if ( $ result !== null ) { return $ result ; } // Compute the square sum. $ sum = 0 ; foreach ( $ this -> components as $ component ) { $ sum += $ component * $ component ; } return $ result = $ sum ; }
Returns the square of the Vector's length.

@return  float
Returns the square of the Vector s length .