1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00
This commit is contained in:
Justin Lin
2019-04-28 17:48:41 +08:00
parent 92f4e12a9a
commit 022269a13b

View File

@@ -2,12 +2,13 @@ include <__private__/__m_multiply.scad>;
function _q_rotation(a, v) =
let(
half_a = a / 2,
axis = v / norm(v),
s = sin(a / 2),
s = sin(half_a),
x = s * axis[0],
y = s * axis[1],
z = s * axis[2],
w = cos(a / 2),
w = cos(half_a),
x2 = x + x,
y2 = y + y,