Quaternion type: Difference between revisions
Content deleted Content added
→{{header|python}}: Extend Q class |
m →{{header|python}}: remove debug code lines |
||
Line 132: | Line 132: | ||
def __truediv__(self, other): |
def __truediv__(self, other): |
||
if type(other) == Q: |
if type(other) == Q: |
||
a1,b1,c1,d1 = self |
|||
a2,b2,c2,d2 = other |
|||
return self.__mul__(other.reciprocal()) |
return self.__mul__(other.reciprocal()) |
||
try: |
try: |
||
Line 142: | Line 140: | ||
def __rtruediv__(self, other): |
def __rtruediv__(self, other): |
||
print(self, other) |
|||
return other * self.reciprocal() |
return other * self.reciprocal() |
||