The reciprocal, 1/q = q'/(q*q') = q' / norm(q)
(self)
| 4355 | return self.__class__(self.scalar/n, self.vector/n) |
| 4356 | |
| 4357 | def reciprocal(self): |
| 4358 | """The reciprocal, 1/q = q'/(q*q') = q' / norm(q)""" |
| 4359 | n = self.norm |
| 4360 | return self.__class__(self.scalar/n, -self.vector/n) |
| 4361 | |
| 4362 | def __div__(self, other): |
| 4363 | return self*other.reciprocal() |
no outgoing calls