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.
◆ LocVec2D() [2/4]
◆ 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 |
◆ operator*=()
LocVec2D& TrkDriftCircleMath::LocVec2D::operator*= |
( |
double |
v | ) |
|
|
inline |
◆ 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.
◆ operator-()
◆ operator-=()
◆ operator/=()
LocVec2D& TrkDriftCircleMath::LocVec2D::operator/= |
( |
double |
v | ) |
|
|
inline |
◆ operator=() [1/2]
Default assignment operators (Equivalent to the setter x)
◆ operator=() [2/2]
◆ set() [1/2]
Setter function using another vector.
Definition at line 32 of file LocVec2D.h.
◆ set() [2/2]
void TrkDriftCircleMath::LocVec2D::set |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
inline |
Set x & y simultaenously.
Definition at line 37 of file LocVec2D.h.
◆ 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: