@@ -49,7 +49,7 @@ def __abs__(self) -> float:
4949 """
5050 return sqrt (self .real ** 2 + self .imag ** 2 )
5151
52- def __add__ (self , o : Complex ) -> C :
52+ def __add__ (self , o : Complex ) -> "C" :
5353 """
5454 Addiert zwei komplexe Zahlen.
5555
@@ -59,15 +59,15 @@ def __add__(self, o: Complex) -> C:
5959 assert isinstance (o , Complex )
6060 return C (self .real + o .real , self .imag + o .imag )
6161
62- def __radd__ (self , o : float ) -> C :
62+ def __radd__ (self , o : float ) -> "C" :
6363 """
6464 Addiert eine rationale Zahl zu einer komplexen Zahl.
6565
6666 Hierbei ändert sich einfach nur der Realteil.
6767 """
6868 return C (self .real + o , self .imag )
6969
70- def __mul__ (self , o : Complex ) -> C :
70+ def __mul__ (self , o : Complex ) -> "C" :
7171 """
7272 Multipliziert zwei komplexe Zahlen.
7373 """
@@ -77,15 +77,15 @@ def __mul__(self, o: Complex) -> C:
7777 imag = self .real * o .imag + self .imag * o .real
7878 )
7979
80- def __rmul__ (self , o : float ) -> C :
80+ def __rmul__ (self , o : float ) -> "C" :
8181 """
8282 Multipliziert eine rationale Zahl an eine komplexe Zahl.
8383
8484 Hierbei ändert sich nur der Realteil.
8585 """
8686 return C (self .real * o , self .imag )
8787
88- def __pow__ (self , o : int ) -> C :
88+ def __pow__ (self , o : int ) -> "C" :
8989 """
9090 Potenziert eine komplexe Zahl.
9191 """
@@ -95,13 +95,13 @@ def __pow__(self, o: int) -> C:
9595 value *= self
9696 return value
9797
98- def __rpow__ (self , o : float ) -> C :
98+ def __rpow__ (self , o : float ) -> "C" :
9999 """
100100 Potenziert nur den Realteil.
101101 """
102102 return C (self .real ** o , self .imag )
103103
104- def __truediv__ (self , o : Complex ) -> C :
104+ def __truediv__ (self , o : Complex ) -> "C" :
105105 """
106106 Dividiert zwei komplexe Zahlen.
107107 """
@@ -111,7 +111,7 @@ def __truediv__(self, o: Complex) -> C:
111111 imag = (self .imag * o .real - self .real * o .imag ) / (o .real ** 2 + o .imag ** 2 )
112112 )
113113
114- def __rtruediv__ (self , o : float ) -> C :
114+ def __rtruediv__ (self , o : float ) -> "C" :
115115 """
116116 Dividiert eine komplexe Zahl durch eine rationale Zahl.
117117
@@ -130,19 +130,19 @@ def __eq__(self, o: object) -> bool:
130130 return False
131131 return (self .real == o .real ) and (self .imag == o .imag )
132132
133- def conjugate (self ) -> C :
133+ def conjugate (self ) -> "C" :
134134 """
135135 Berechnet das komplexe Konjugat einer komplexen Zahl.
136136 """
137137 return C (self .real , - self .imag )
138138
139- def __pos__ (self ) -> C :
139+ def __pos__ (self ) -> "C" :
140140 """
141141 Berechnet +x (für x eine komplexe Zahl).
142142 """
143143 return self
144144
145- def __neg__ (self ) -> C :
145+ def __neg__ (self ) -> "C" :
146146 """
147147 Berechnet -x (für x eine komplexe Zahl).
148148 """
0 commit comments