Skip to content

Commit

Permalink
Add quaternionDistance.
Browse files Browse the repository at this point in the history
  • Loading branch information
avalenzu committed Feb 13, 2015
1 parent fdca11f commit 743c196
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/quaternionDistance.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
function quat_norm = quaternionDistance(quat1,quat2)
lambda = sum(bsxfun(@times,quat1,quat2),1);
quat_norm = 1-abs(lambda);
end

0 comments on commit 743c196

Please sign in to comment.