Implementation of 2 dimensional vector class.
More...
#include <LocVec2D.h>
Implementation of 2 dimensional vector class.
Definition at line 16 of file LocVec2D.h.
◆ LocVec2D() [1/4]
| TrkDriftCircleMath::LocVec2D::LocVec2D |
( |
double | x, |
|
|
double | y ) |
|
inline |
Constructor parsing the coordinates.
Definition at line 19 of file LocVec2D.h.
double y() const
Returns the y coordinate of the vector.
double x() const
Returns the x coordinate of the vector.
◆ LocVec2D() [2/4]
| TrkDriftCircleMath::LocVec2D::LocVec2D |
( |
const LocVec2D & | | ) |
|
|
default |
◆ LocVec2D() [3/4]
| TrkDriftCircleMath::LocVec2D::LocVec2D |
( |
LocVec2D && | | ) |
|
|
default |
◆ LocVec2D() [4/4]
| TrkDriftCircleMath::LocVec2D::LocVec2D |
( |
| ) |
|
|
default |
◆ ~LocVec2D()
| TrkDriftCircleMath::LocVec2D::~LocVec2D |
( |
| ) |
|
|
default |
◆ cross()
| double TrkDriftCircleMath::LocVec2D::cross |
( |
const LocVec2D & | lv | ) |
const |
|
inline |
Definition at line 87 of file LocVec2D.h.
87{
return y() * lv.x() -
x() * lv.y(); }
◆ mag()
| double TrkDriftCircleMath::LocVec2D::mag |
( |
| ) |
const |
|
inline |
◆ operator*() [1/2]
| double TrkDriftCircleMath::LocVec2D::operator* |
( |
const LocVec2D & | lv | ) |
const |
|
inline |
Definition at line 68 of file LocVec2D.h.
68{
return x() * lv.x() +
y() * lv.y(); }
◆ operator*() [2/2]
| LocVec2D TrkDriftCircleMath::LocVec2D::operator* |
( |
double | v | ) |
const |
|
inline |
Definition at line 70 of file LocVec2D.h.
70 {
73 }
LocVec2D(double x, double y)
Constructor parsing the coordinates.
◆ operator*=()
| LocVec2D & TrkDriftCircleMath::LocVec2D::operator*= |
( |
double | v | ) |
|
|
inline |
Definition at line 75 of file LocVec2D.h.
75 {
78 return *this;
79 }
◆ operator+()
Plus and minus operators.
Definition at line 47 of file LocVec2D.h.
47{
return LocVec2D(
x() + lv.x(),
y() + lv.y()); }
◆ operator+=()
Incrementation operator.
Definition at line 56 of file LocVec2D.h.
56 {
59 return *this;
60 }
◆ operator-()
◆ operator-=()
Definition at line 62 of file LocVec2D.h.
62 {
65 return *this;
66 }
◆ operator/=()
| LocVec2D & TrkDriftCircleMath::LocVec2D::operator/= |
( |
double | v | ) |
|
|
inline |
Definition at line 81 of file LocVec2D.h.
81 {
84 return *this;
85 }
◆ operator=() [1/2]
Default assignment operators (Equivalent to the setter x)
◆ operator=() [2/2]
◆ set() [1/2]
| void TrkDriftCircleMath::LocVec2D::set |
( |
const LocVec2D & | vec | ) |
|
|
inline |
Setter function using another vector.
Definition at line 32 of file LocVec2D.h.
32 {
35 }
std::vector< size_t > vec
◆ set() [2/2]
| void TrkDriftCircleMath::LocVec2D::set |
( |
double | x, |
|
|
double | y ) |
|
inline |
◆ setX()
| void TrkDriftCircleMath::LocVec2D::setX |
( |
double | x | ) |
|
|
inline |
◆ setY()
| void TrkDriftCircleMath::LocVec2D::setY |
( |
double | y | ) |
|
|
inline |
◆ x()
| double TrkDriftCircleMath::LocVec2D::x |
( |
| ) |
const |
|
inline |
Returns the x coordinate of the vector.
Definition at line 27 of file LocVec2D.h.
◆ y()
| double TrkDriftCircleMath::LocVec2D::y |
( |
| ) |
const |
|
inline |
Returns the y coordinate of the vector.
Definition at line 29 of file LocVec2D.h.
◆ m_x
| double TrkDriftCircleMath::LocVec2D::m_x {0} |
|
private |
◆ m_y
| double TrkDriftCircleMath::LocVec2D::m_y {0} |
|
private |
The documentation for this class was generated from the following file: