diff --git a/owlps-positioner/src/point3d.cc b/owlps-positioner/src/point3d.cc index 8c9cea5..256eb0e 100644 --- a/owlps-positioner/src/point3d.cc +++ b/owlps-positioner/src/point3d.cc @@ -54,21 +54,6 @@ float Point3D::square_distance(const Point3D &source) const } -/** - * The distance is not square rooted after the computation, in order - * to optimise comparisons. - */ -float Point3D::square_distance(const float _x, - const float _y, - const float _z) const -{ - return - (x - _x) * (x - _x) + - (y - _y) * (y - _y) + - (z - _z) * (z - _z) ; -} - - /** * A, B and C are three points, A being the current Point3D (*this). * If the points are aligned, the angle returned is always 0° (and not diff --git a/owlps-positioner/src/point3d.hh b/owlps-positioner/src/point3d.hh index 543e841..a46d761 100644 --- a/owlps-positioner/src/point3d.hh +++ b/owlps-positioner/src/point3d.hh @@ -57,14 +57,6 @@ public: float square_distance(const Point3D &p) const ; /// Euclidean distance to a Point3D float distance(const Point3D &p) const ; - /// Square euclidean distance to a 3-float defined point - float square_distance(const float mx, - const float my, - const float mz) const ; - /// Euclidean distance to a 3-float defined point - float distance(const float mx, - const float my, - const float mz) const ; /// Euclidean distance to the radius of a sphere float distance_to_sphere(const Point3D ¢re, const float radius) const ; @@ -180,18 +172,6 @@ inline float Point3D::distance(const Point3D &source) const } -/** - * Note: to compare distances, use preferably square_distance(), - * which is more efficient. - */ -inline float Point3D::distance(const float _x, - const float _y, - const float _z) const -{ - return sqrt(square_distance(_x, _y, _z)) ; -} - - /** * @param centre The centre of the sphere. * @param radius The radius of the sphere.