Browse files

Fix bug in OptimalCosineDistance, fixes #4

  • Loading branch information...
1 parent e101417 commit 00f0ba38876956cc84451242907a39f6accde9e3 @britg committed Feb 3, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 WTMGlyph/WTMGlyphUtilities.m
View
2 WTMGlyph/WTMGlyphUtilities.m
@@ -237,7 +237,7 @@ float OptimalCosineDistance(FloatArrayContainer v1, FloatArrayContainer v2) {
for (int ii = 0; ii < mincount; ii+=2) {
a += v1.items[ii] * v2.items[ii] + v1.items[ii+1] * v2.items[ii+1];
- b += v1.items[ii] * v2.items[ii+1] + v1.items[ii+1] * v2.items[ii];
+ b += v1.items[ii] * v2.items[ii+1] - v1.items[ii+1] * v2.items[ii];
}
angle = atanf( b / a );

0 comments on commit 00f0ba3

Please sign in to comment.