matthew-brett / transforms3d

3 dimensional spatial transformations
http://matthew-brett.github.io/transforms3d/
Other
467 stars 83 forks source link

qnorm returns square norm #20

Closed MaximeLemonnier-Leddartech closed 2 years ago

MaximeLemonnier-Leddartech commented 6 years ago

def qnorm(q): ''' Return norm of quaternion

Parameters
----------
q : 4 element sequence
   w, i, j, k of quaternion

Returns
-------
n : scalar
   quaternion norm
'''
return np.dot(q, q) <--- wrong! should be np.sqrt(np.dot(q, q))
matthew-brett commented 6 years ago

Oops - and I was only testing unit quaterions. Would you mind having a look at https://github.com/matthew-brett/transforms3d/pull/22 ?

matthew-brett commented 2 years ago

Closed by #22 - thanks.