22 double oldTolerance (tolerance);
54 double ss = std::sin(aangle);
55 double cc = std::cos(aangle);
70 os <<
"(" << q.
x() <<
", " << q.
y() <<
")";
75 double & x,
double & y );
91 }
else if ( dy < v.dy ) {
93 }
else if ( dx > v.dx ) {
95 }
else if ( dx < v.dx ) {
118 return ( (*
this - p).
mag2() <= limit );
122 double d = (*
this -
p).
mag2();
124 if ( (pdp > 0) && (d < pdp) ) {
125 return std::sqrt (d/pdp);
126 }
else if ( (pdp == 0) && (d == 0) ) {
136 double v1v2 = std::fabs(
dot(v));
139 return ( (
mag2() == 0) && (v.
mag2() == 0) ) ? 0 : 1;
141 double abscross = std::fabs ( dx * v.
y() - dy - v.
x() );
142 if ( abscross >= v1v2 ) {
145 return abscross/v1v2;
153 double v1v2 = std::fabs(
dot(v));
156 return ( (
mag2() == 0) && (v.
mag2() == 0) );
158 double abscross = std::fabs ( dx * v.
y() - dy - v.
x() );
159 return ( abscross <= epsilon * v1v2 );
165 double v1v2 = std::fabs(
dot(v));
169 double abscross = std::fabs ( dx * v.
y() - dy - v.
x() );
170 if ( v1v2 >= abscross ) {
173 return v1v2/abscross;
181 double v1v2 = std::fabs(
dot(v));
182 double abscross = std::fabs ( dx * v.
y() - dy - v.
x() );
183 return ( v1v2 <= epsilon * abscross );
double howNear(const Hep2Vector &p) const
bool operator>=(const Hep2Vector &v) const
bool isOrthogonal(const Hep2Vector &p, double epsilon=tolerance) const
bool operator<=(const Hep2Vector &v) const
bool isNear(const Hep2Vector &p, double epsilon=tolerance) const
bool operator>(const Hep2Vector &v) const
double operator()(int i) const
bool operator<(const Hep2Vector &v) const
std::ostream & operator<<(std::ostream &os, const HepRandom &dist)
void set(double x, double y)
void ZMinput2doubles(std::istream &is, const char *type, double &x, double &y)
double howParallel(const Hep2Vector &p) const
HepLorentzVector operator/(const HepLorentzVector &, double a)
static double setTolerance(double tol)
double howOrthogonal(const Hep2Vector &p) const
std::istream & operator>>(std::istream &is, HepRandom &dist)
bool isParallel(const Hep2Vector &p, double epsilon=tolerance) const
double dot(const Hep2Vector &p) const
int compare(const Hep2Vector &v) const
double epsilon(double density, double temperature)