Update quaternions.scad

This commit is contained in:
RonaldoCMP 2020-07-17 21:14:56 +01:00
parent 34a589bdde
commit 9b779972a5

View File

@ -612,9 +612,9 @@ function Q_Nlerp(q1,q2,u) =
function Q_Squad(q1,q2,q3,q4,u) = function Q_Squad(q1,q2,q3,q4,u) =
assert(is_num(0*u) || is_range(u) || (is_list(u) && is_num(0*u*u)) , assert(is_num(0*u) || is_range(u) || (is_list(u) && is_num(0*u*u)) ,
"Invalid interpolation coefficient(s)" ) "Invalid interpolation coefficient(s)" )
is_num(u) is_num(u)
? Q_Slerp( Q_Slerp(q1,q4,u), Q_Slerp(q2,q3,u), 2*u*(1-u)) ? Q_Slerp( Q_Slerp(q1,q4,u), Q_Slerp(q2,q3,u), 2*u*(1-u))
: Q_Slerp( Q_Slerp(q1,q4,u), Q_Slerp(q2,q3,u), [for(ui=u) 2*ui*(1-ui)]); : [for(ui=u) Q_Slerp( Q_Slerp(q1,q4,ui), Q_Slerp(q2,q3,ui), 2*ui*(1-ui) ]);
// Function: Q_exp() // Function: Q_exp()