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

Method __mul__

lib/mpl_toolkits/mplot3d/axes3d.py:4330–4341  ·  view source on GitHub ↗

Product of two quaternions i*i = j*j = k*k = i*j*k = -1 Quaternion multiplication can be expressed concisely using scalar and vector parts, see

(self, other)

Source from the content-addressed store, hash-verified

4328 return self.__class__(-self.scalar, -self.vector)
4329
4330 def __mul__(self, other):
4331 """
4332 Product of two quaternions
4333 i*i = j*j = k*k = i*j*k = -1
4334 Quaternion multiplication can be expressed concisely
4335 using scalar and vector parts,
4336 see <https://en.wikipedia.org/wiki/Quaternion#Scalar_and_vector_parts>
4337 """
4338 return self.__class__(
4339 self.scalar*other.scalar - np.dot(self.vector, other.vector),
4340 self.scalar*other.vector + self.vector*other.scalar
4341 + np.cross(self.vector, other.vector))
4342
4343 def conjugate(self):
4344 """The conjugate quaternion -(1/2)*(q+i*q*i+j*q*j+k*q*k)"""

Callers

nothing calls this directly

Calls 1

dotMethod · 0.80

Tested by

no test coverage detected