MCPcopy Create free account
hub / github.com/Kitware/VTK / q_mult

Function q_mult

Web/Python/vtkmodules/web/camera.py:16–23  ·  view source on GitHub ↗
(q1, q2)

Source from the content-addressed store, hash-verified

14
15
16def q_mult(q1, q2):
17 w1, x1, y1, z1 = q1
18 w2, x2, y2, z2 = q2
19 w = w1 * w2 - x1 * x2 - y1 * y2 - z1 * z2
20 x = w1 * x2 + x1 * w2 + y1 * z2 - z1 * y2
21 y = w1 * y2 + y1 * w2 + z1 * x2 - x1 * z2
22 z = w1 * z2 + z1 * w2 + x1 * y2 - y1 * x2
23 return w, x, y, z
24
25
26def q_conjugate(q):

Callers 1

qv_multFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected