Store 3D position.
More...
#include <position.h>
Implicit constructor Instantiate position to (0,0,0)m.
| Position::Position |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
|
inline |
Explicit constructor.
- Parameters
-
| x | x component in m |
| y | y component in m |
| z | z component in m |
| double Position::norm |
( |
| ) |
const |
|
inline |
Returns the norm of the vector.
- Returns
- the norm
| bool Position::operator!= |
( |
const Position & |
p | ) |
const |
|
inline |
Compare two positions.
- Parameters
-
- Returns
- True if two positions are not same
| Position Position::operator* |
( |
const double & |
m | ) |
const |
|
inline |
Multiply times a scalar.
- Parameters
-
- Returns
- Scaled position
@ brief Add two positions
- Parameters
-
- Returns
- Sum of this position and p
@ brief Subtract two positions
- Parameters
-
- Returns
- Difference of this position and p
| Position Position::operator/ |
( |
const double & |
m | ) |
const |
|
inline |
Divide by a scalar.
- Parameters
-
- Returns
- Scaled position
| bool Position::operator== |
( |
const Position & |
p | ) |
const |
|
inline |
Compare two positions.
- Parameters
-
- Returns
- True if two positions are same
The documentation for this struct was generated from the following file: