[Positioning] MinMax: Fix start/stop and < vs. <=

This commit is contained in:
Matteo Cypriani 2010-04-16 09:33:03 +02:00
parent 814ff2b651
commit a9ac8616e8
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ Point3D MinMax::multilaterate(
if (dist > d_max) if (dist > d_max)
d_max = dist ; d_max = dist ;
} }
if (d_max < min) if (d_max <= min)
{ {
min = d_max ; min = d_max ;
centre.set_coordinates(x, y, z) ; centre.set_coordinates(x, y, z) ;

View File

@ -7,8 +7,8 @@
class MinMax: public MultilaterationMethod class MinMax: public MultilaterationMethod
{ {
protected: protected:
const Point3D &start ; const Point3D start ;
const Point3D &stop ; const Point3D stop ;
float step ; float step ;
static const float MINMAX_DEFAULT_STEP = 0.5 ; static const float MINMAX_DEFAULT_STEP = 0.5 ;