(self, v)
| 4365 | __truediv__ = __div__ |
| 4366 | |
| 4367 | def rotate(self, v): |
| 4368 | # Rotate the vector v by the quaternion q, i.e., |
| 4369 | # calculate (the vector part of) q*v/q |
| 4370 | v = self.__class__(0, v) |
| 4371 | v = self*v/self |
| 4372 | return v.vector |
| 4373 | |
| 4374 | def __eq__(self, other): |
| 4375 | return (self.scalar == other.scalar) and (self.vector == other.vector).all |
no outgoing calls