Definition at line 31 of file TwoVector.h.
◆ TwoVector() [1/2]
◆ TwoVector() [2/2]
◆ getComponent()
double getComponent |
( |
int |
i | ) |
const |
|
inline |
Definition at line 73 of file TwoVector.h.
74 {
75 switch (i) {
76 case 0: return getX();
77 case 1: return getY();
78 }
79 return NAN;
80 }
◆ getMag()
Definition at line 69 of file TwoVector.h.
69{ return std::sqrt(getMag2()); }
◆ getMag2()
Definition at line 68 of file TwoVector.h.
68{ return x * x + y * y; }
◆ getPhi()
Definition at line 71 of file TwoVector.h.
71{ return std::atan2(y, x); }
◆ getX()
◆ getY()
◆ operator*=()
Definition at line 104 of file TwoVector.h.
105 {
106 x *= rhs;
107 y *= rhs;
108 return *this;
109 }
◆ operator+=()
Definition at line 90 of file TwoVector.h.
91 {
92 x += rhs.x;
93 y += rhs.y;
94 return *this;
95 }
◆ operator-=()
Definition at line 97 of file TwoVector.h.
98 {
99 x -= rhs.x;
100 y -= rhs.y;
101 return *this;
102 }
◆ setValues()
TwoVector & setValues |
( |
double |
x_, |
|
|
double |
y_ |
|
) |
| |
|
inline |
Definition at line 82 of file TwoVector.h.
83 {
84 x = x_;
85 y = y_;
86 return *this;
87 }
The documentation for this class was generated from the following file: