Changeset 959

Show
Ignore:
Timestamp:
11/06/08 10:48:32 (2 months ago)
Author:
mloskot
Message:

liblas::LASPoint: fixed incorrect logical-or where logical-and is expected (Ticket #84).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/laspoint.cpp

    r813 r959  
    144144bool LASPoint::equal(LASPoint const& other) const 
    145145{ 
    146     double const epsilon = std::numeric_limits<double>::epsilon();  
     146    // TODO - mloskot: Default epsilon is too small. 
     147    //                 Is 0.00001 good as tolerance or too wide? 
     148    //double const epsilon = std::numeric_limits<double>::epsilon();  
     149    double const epsilon = 0.00001; 
    147150 
    148151    double const dx = m_coords[0] - other.m_coords[0]; 
     
    152155    // TODO: Should we compare other data members, besides the coordinates? 
    153156 
    154     if (((dx <= epsilon) && (dx >= -epsilon )) 
    155         || ((dy <= epsilon) && (dy >= -epsilon )) 
    156         || ((dz <= epsilon) && (dz >= -epsilon ))) 
     157    if (((dx <= epsilon) && (dx >= -epsilon)) 
     158        && ((dy <= epsilon) && (dy >= -epsilon)) 
     159        && ((dz <= epsilon) && (dz >= -epsilon))) 
    157160    { 
    158161        return true;