Engauge Digitizer  2
PointComparator.h
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef POINT_COMPARATOR_H
8 #define POINT_COMPARATOR_H
9 
10 #include "Point.h"
11 
14 {
16  bool operator()(const Point &a, const Point &b) const
17  {
18  return a.ordinal() < b.ordinal();
19  }
20 };
21 
22 #endif // POINT_COMPARATOR_H
Comparator for sorting Point class.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition: Point.h:23
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.
Definition: Point.cpp:374
bool operator()(const Point &a, const Point &b) const
Comparison function used by qSort.