[Positioner] Point3D: delete unused distance()

Delete unused functions distance(x,y,z) and square_distance(x,y,z).
This commit is contained in:
Matteo Cypriani 2012-04-27 15:26:09 +02:00
parent 987773a4df
commit 007594683c
2 changed files with 0 additions and 35 deletions

View File

@ -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

View File

@ -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 &centre,
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.