Changeset View
Changeset View
Standalone View
Standalone View
EvtGenBase/EvtPoint1D.hh
Show All 16 Lines | |||||
* You should have received a copy of the GNU General Public License * | * You should have received a copy of the GNU General Public License * | ||||
* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. * | * along with EvtGen. If not, see <https://www.gnu.org/licenses/>. * | ||||
***********************************************************************/ | ***********************************************************************/ | ||||
#ifndef EVT_POINT_1D_HH | #ifndef EVT_POINT_1D_HH | ||||
#define EVT_POINT_1D_HH | #define EVT_POINT_1D_HH | ||||
// Point on a finite 1-D interval. isValid shows whether for a given specification, | // Point on a finite 1-D interval. isValid shows whether for a given specification, | ||||
// the coordinate _value is inside the interval defined by _min, _max. | // the coordinate m_value is inside the interval defined by m_min, m_max. | ||||
class EvtPoint1D final { | class EvtPoint1D final { | ||||
public: | public: | ||||
EvtPoint1D(); | EvtPoint1D(); | ||||
EvtPoint1D( double value ); | EvtPoint1D( double value ); | ||||
EvtPoint1D( double min, double max, double value ); | EvtPoint1D( double min, double max, double value ); | ||||
bool isValid() const { return _valid; } | bool isValid() const { return m_valid; } | ||||
double value() const { return _value; } | double value() const { return m_value; } | ||||
void print() const; | void print() const; | ||||
private: | private: | ||||
double _min; // interval minimum | double m_min; // interval minimum | ||||
double _max; // interval maximum | double m_max; // interval maximum | ||||
double _value; | double m_value; | ||||
bool _valid; // valid point inside the interval? | bool m_valid; // valid point inside the interval? | ||||
}; | }; | ||||
#endif | #endif |