#include <TPoint2D.h>
Public Member Functions | |
double | cross (const TPoint2D &) const |
double | cross (const TPoint2D &) const |
double | dot (const TPoint2D &) const |
double | dot (const TPoint2D &) const |
double | mag (void) const |
double | mag (void) const |
double | mag2 (void) const |
double | mag2 (void) const |
TPoint2D | operator+ (const TPoint2D &) const |
TPoint2D | operator+ (const TPoint2D &) const |
TPoint2D | operator- () const |
TPoint2D | operator- (const TPoint2D &) const |
TPoint2D | operator- () const |
TPoint2D | operator- (const TPoint2D &) const |
bool | operator== (const TPoint2D &) const |
bool | operator== (const TPoint2D &) const |
double | phi (void) const |
double | phi (void) const |
TPoint2D (const HepVector3D &) | |
TPoint2D (const HepPoint3D &) | |
TPoint2D (double, double) | |
TPoint2D () | |
Constructors. | |
TPoint2D (const HepVector3D &) | |
TPoint2D (const HepPoint3D &) | |
TPoint2D (double, double) | |
TPoint2D () | |
Constructors. | |
TPoint2D | unit (void) const |
TPoint2D | unit (void) const |
double | x (double) |
double | x (void) const |
double | x (double) |
double | x (void) const |
double | y (double) |
double | y (void) const |
double | y (double) |
double | y (void) const |
virtual | ~TPoint2D () |
Destructor. | |
virtual | ~TPoint2D () |
Destructor. | |
Private Attributes | |
double | _p [2] |
|
Constructors.
|
|
|
|
|
|
|
|
Destructor.
00039 { 00040 }
|
|
Constructors.
|
|
|
|
|
|
|
|
Destructor.
|
|
|
|
|
|
|
|
|
|
|
|
00112 {
00113 return sqrt(_p[0] * _p[0] + _p[1] * _p[1]);
00114 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00157 { 00158 return TPoint2D(- _p[0], - _p[1]); 00159 }
|
|
|
|
|
|
|
|
|
|
00124 { 00125 if (_p[0] == 0.0 && _p[1] == 0.0) return 0.; 00126 double a = atan2(_p[1], _p[0]); 00127 if (a > 0) return a; 00128 return a + 2. * M_PI; 00129 }
|
|
|
|
00170 { 00171 double sum2 = _p[0] * _p[0] + _p[1] * _p[1]; 00172 if (sum2 == 0.) return TPoint2D(0., 0.); 00173 double sum = sqrt(sum2); 00174 return TPoint2D(_p[0] / sum, _p[1] / sum); 00175 }
|
|
|
|
|
|
00100 { 00101 return _p[0] = a; 00102 }
|
|
00088 { 00089 return _p[0]; 00090 }
|
|
|
|
|
|
00106 { 00107 return _p[1] = a; 00108 }
|
|
00094 { 00095 return _p[1]; 00096 }
|
|
|