Definition at line 45 of file Distance.hpp.
◆ Distance() [1/2]
constexpr state_representation::units::Distance::Distance |
( |
long double |
n = 0.0 | ) |
|
|
constexpr |
Constructor with a value in meter.
- Parameters
-
Definition at line 223 of file Distance.hpp.
◆ Distance() [2/2]
constexpr state_representation::units::Distance::Distance |
( |
const Distance & |
dist | ) |
|
|
constexpr |
Copy constructor from another distance.
- Parameters
-
Definition at line 226 of file Distance.hpp.
◆ get_value()
constexpr long double state_representation::units::Distance::get_value |
( |
| ) |
const |
|
constexpr |
Getter of the value attribute.
- Returns
- the value in meter
Definition at line 229 of file Distance.hpp.
◆ operator!=()
constexpr bool state_representation::units::Distance::operator!= |
( |
const Distance & |
rhs | ) |
const |
|
constexpr |
Overload the != operator.
- Parameters
-
rhs | the other Distance to check inequality with |
- Returns
- bool true if the two distances are different
Definition at line 286 of file Distance.hpp.
◆ operator*()
constexpr Distance state_representation::units::Distance::operator* |
( |
double |
lambda | ) |
const |
|
constexpr |
Overload the * operator with a scalar.
- Parameters
-
lambda | the scalar to multiply with |
- Returns
- the Distance multiply by lambda
Definition at line 265 of file Distance.hpp.
◆ operator*=()
constexpr Distance & state_representation::units::Distance::operator*= |
( |
double |
lambda | ) |
|
|
constexpr |
Overload the *= operator with a scalar.
- Parameters
-
lambda | the scalar to multiply with |
- Returns
- the Distance multiply by lambda
Definition at line 260 of file Distance.hpp.
◆ operator+()
constexpr Distance state_representation::units::Distance::operator+ |
( |
const Distance & |
rhs | ) |
const |
|
constexpr |
◆ operator+=()
constexpr Distance & state_representation::units::Distance::operator+= |
( |
const Distance & |
rhs | ) |
|
|
constexpr |
◆ operator-() [1/2]
constexpr Distance & state_representation::units::Distance::operator- |
( |
| ) |
|
|
constexpr |
Overload the - operator.
- Returns
- the negative distance in meter
Definition at line 233 of file Distance.hpp.
◆ operator-() [2/2]
constexpr Distance state_representation::units::Distance::operator- |
( |
const Distance & |
rhs | ) |
const |
|
constexpr |
◆ operator-=()
constexpr Distance & state_representation::units::Distance::operator-= |
( |
const Distance & |
rhs | ) |
|
|
constexpr |
◆ operator/()
constexpr Distance state_representation::units::Distance::operator/ |
( |
double |
lambda | ) |
const |
|
constexpr |
Overload the / operator with a scalar.
- Parameters
-
lambda | the scalar to divide by |
- Returns
- the Distance divided by lambda
Definition at line 276 of file Distance.hpp.
◆ operator/=()
constexpr Distance & state_representation::units::Distance::operator/= |
( |
double |
lambda | ) |
|
|
constexpr |
Overload the /= operator with a scalar.
- Parameters
-
lambda | the scalar to divide by |
- Returns
- the Distance divided by lambda
Definition at line 271 of file Distance.hpp.
◆ operator<()
constexpr bool state_representation::units::Distance::operator< |
( |
const Distance & |
rhs | ) |
const |
|
constexpr |
Overload the < operator.
- Parameters
-
rhs | the other Distance to check strict inferiority with |
- Returns
- bool true if the current distance is strictly inferior than provided distance
Definition at line 298 of file Distance.hpp.
◆ operator<=()
constexpr bool state_representation::units::Distance::operator<= |
( |
const Distance & |
rhs | ) |
const |
|
constexpr |
Overload the < operator.
- Parameters
-
rhs | the other Distance to check inferiority with |
- Returns
- bool true if the current distance is inferior than provided distance
Definition at line 302 of file Distance.hpp.
◆ operator==()
constexpr bool state_representation::units::Distance::operator== |
( |
const Distance & |
rhs | ) |
const |
|
constexpr |
Overload the == operator.
- Parameters
-
rhs | the other Distance to check equality with |
- Returns
- bool true if the two distances are equal
Definition at line 282 of file Distance.hpp.
◆ operator>()
constexpr bool state_representation::units::Distance::operator> |
( |
const Distance & |
rhs | ) |
const |
|
constexpr |
Overload the > operator.
- Parameters
-
rhs | the other Distance to check strict superiority with |
- Returns
- bool true if the current distance is strictly superior than provided distance
Definition at line 290 of file Distance.hpp.
◆ operator>=()
constexpr bool state_representation::units::Distance::operator>= |
( |
const Distance & |
rhs | ) |
const |
|
constexpr |
Overload the > operator.
- Parameters
-
rhs | the other Distance to check superiority with |
- Returns
- bool true if the current distance is superior than provided distance
Definition at line 294 of file Distance.hpp.
◆ literals::operator""_cm
constexpr Distance literals::operator""_cm |
( |
long double |
n | ) |
|
|
friend |
Literal operator to create a Distance in centimeter.
- Parameters
-
n | the distance value in centimeter |
the | Distance in the base unit (meter) |
◆ literals::operator""_dm
constexpr Distance literals::operator""_dm |
( |
long double |
n | ) |
|
|
friend |
Literal operator to create a Distance in decimeter.
- Parameters
-
n | the distance value in decimeter |
the | Distance in the base unit (meter) |
◆ literals::operator""_km
constexpr Distance literals::operator""_km |
( |
long double |
n | ) |
|
|
friend |
Literal operator to create a Distance in kilometer.
- Parameters
-
n | the distance value in kilometer |
the | Distance in the base unit (meter) |
◆ literals::operator""_m
constexpr Distance literals::operator""_m |
( |
long double |
n | ) |
|
|
friend |
Literal operator to create a Distance in meter.
- Parameters
-
n | the distance value in meter |
the | Distance in the base unit (meter) |
◆ literals::operator""_mm
constexpr Distance literals::operator""_mm |
( |
long double |
n | ) |
|
|
friend |
Literal operator to create a Distance in millimeter.
- Parameters
-
n | the distance value in millimeter |
the | Distance in the base unit (meter) |
◆ operator*
Overload the / operator with a scalar on the left side.
- Parameters
-
lambda | the scalar to multiply with |
- Returns
- the Distance multiply by lambda
Definition at line 310 of file Distance.hpp.
◆ operator/
Overload the / operator between two distances.
- Parameters
-
lhs | the first distance |
rhs | the second distance |
- Returns
- the ratio between first and second distance
Definition at line 306 of file Distance.hpp.
The documentation for this class was generated from the following file:
- /github/workspace/source/state_representation/include/state_representation/units/Distance.hpp