Skip to content

Commit a025fb1

Browse files
committed
Merge pull request flann-lib#231 from aquad/fixabs
abs -> std::abs
2 parents 04b4a56 + 3645f0c commit a025fb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cpp/flann/algorithms/kdtree_index.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <cassert>
3737
#include <cstring>
3838
#include <stdarg.h>
39+
#include <cmath>
3940

4041
#include "flann/general.h"
4142
#include "flann/algorithms/nn_index.h"
@@ -663,7 +664,7 @@ class KDTreeIndex : public NNIndex<Distance>
663664
ElementType max_span = 0;
664665
size_t div_feat = 0;
665666
for (size_t i=0;i<veclen_;++i) {
666-
ElementType span = abs(point[i]-leaf_point[i]);
667+
ElementType span = std::abs(point[i]-leaf_point[i]);
667668
if (span > max_span) {
668669
max_span = span;
669670
div_feat = i;

0 commit comments

Comments
 (0)