public function cartesianDistanceTo(Vector $that) : float
    {
        if (!$this->isSameDimension($that)) {
            throw new \DomainException('The given input Vector is not in the same dimension as this Vector.');
        }

        $result = 0;

        foreach ($this->components as $i => $component) {
            $result += pow($component - $that->components[$i], 2);
        }

        return sqrt($result);
    }