summaryrefslogtreecommitdiff
path: root/src/common/include/gudhi/distance_functions.h
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-08 16:19:20 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-08 16:19:20 +0000
commita44155daa5ae4253a874dad4a22b6da4bd017fee (patch)
treedca668d3ada0f45329f80b3f7c49b74ea576523f /src/common/include/gudhi/distance_functions.h
parent50327ad1f3fbf370fcdd3aa877b6e75644329662 (diff)
parentbaf1b5b39be90694b512fff9c79438bf362916f3 (diff)
Merge from trunk.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/debian@1112 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 82a43e89115f09449d4f31ebfd9ff56170d8771f
Diffstat (limited to 'src/common/include/gudhi/distance_functions.h')
-rw-r--r--src/common/include/gudhi/distance_functions.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h
index e5c79ded..cd518581 100644
--- a/src/common/include/gudhi/distance_functions.h
+++ b/src/common/include/gudhi/distance_functions.h
@@ -23,6 +23,8 @@
#ifndef DISTANCE_FUNCTIONS_H_
#define DISTANCE_FUNCTIONS_H_
+#include <cmath> // for std::sqrt
+
/* Compute the Euclidean distance between two Points given
* by a range of coordinates. The points are assumed to have
* the same dimension. */
@@ -35,7 +37,7 @@ double euclidean_distance(Point &p1, Point &p2) {
double tmp = *it1 - *it2;
dist += tmp*tmp;
}
- return sqrt(dist);
+ return std::sqrt(dist);
}
#endif // DISTANCE_FUNCTIONS_H_