MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / rotate

Method rotate

lib/mpl_toolkits/mplot3d/axes3d.py:4367–4372  ·  view source on GitHub ↗
(self, v)

Source from the content-addressed store, hash-verified

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

Callers 1

test_quaternionFunction · 0.45

Calls

no outgoing calls

Tested by 1

test_quaternionFunction · 0.36