Public Member Functions | List of all members
WireCell::ComparePoints Struct Reference

Return true if lhs<rhs w/in tolerance. More...

#include <Point.h>

Public Member Functions

bool operator() (const Point &lhs, const Point &rhs) const
 

Detailed Description

Return true if lhs<rhs w/in tolerance.

Definition at line 43 of file Point.h.

Member Function Documentation

bool WireCell::ComparePoints::operator() ( const Point lhs,
const Point rhs 
) const

Definition at line 24 of file Point.cxx.

26 {
27  double mag = (lhs-rhs).magnitude();
28  if (mag < 1e-10) {
29  return false; // consider them equal
30  }
31  // otherwise, order them by x,y,z
32  for (int ind=0; ind<3; ++ind) {
33  if (lhs[ind] < rhs[ind]) {
34  return true;
35  }
36  }
37  return false;
38 }
const double e
realseq_t magnitude(const compseq_t &seq)
Return the magnitude or absolute value of the sequence.
Definition: Waveform.cxx:65

The documentation for this struct was generated from the following files: