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;
    }