libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::foundation::Meters Struct Reference

#include <types.hpp>

Public Member Functions

constexpr Meters ()=default
constexpr Meters (double m)
constexpr double to_cm () const
constexpr double to_mm () const
constexpr operator double () const
constexpr Meters operator- () const
constexpr Meters operator+ (Meters other) const
constexpr Meters operator- (Meters other) const
constexpr Meters operator* (double scale) const
constexpr Meters operator/ (double scale) const

Static Public Member Functions

static constexpr Meters from_cm (double cm)
static constexpr Meters from_mm (double mm)

Public Attributes

double value {0.0}

Detailed Description

Strongly-typed distance in meters. Use Meters::from_cm() or Meters::from_mm() to convert from other units.

Definition at line 55 of file types.hpp.

Constructor & Destructor Documentation

◆ Meters() [1/2]

libstp::foundation::Meters::Meters ( )
constexprdefault

◆ Meters() [2/2]

libstp::foundation::Meters::Meters ( double m)
inlineexplicitconstexpr

Definition at line 59 of file types.hpp.

Member Function Documentation

◆ from_cm()

constexpr Meters libstp::foundation::Meters::from_cm ( double cm)
inlinestaticconstexpr

Definition at line 61 of file types.hpp.

◆ from_mm()

constexpr Meters libstp::foundation::Meters::from_mm ( double mm)
inlinestaticconstexpr

Definition at line 62 of file types.hpp.

◆ operator double()

libstp::foundation::Meters::operator double ( ) const
inlineconstexpr

Definition at line 67 of file types.hpp.

◆ operator*()

Meters libstp::foundation::Meters::operator* ( double scale) const
inlineconstexpr

Definition at line 72 of file types.hpp.

◆ operator+()

Meters libstp::foundation::Meters::operator+ ( Meters other) const
inlineconstexpr

Definition at line 70 of file types.hpp.

◆ operator-() [1/2]

Meters libstp::foundation::Meters::operator- ( ) const
inlineconstexpr

Definition at line 69 of file types.hpp.

◆ operator-() [2/2]

Meters libstp::foundation::Meters::operator- ( Meters other) const
inlineconstexpr

Definition at line 71 of file types.hpp.

◆ operator/()

Meters libstp::foundation::Meters::operator/ ( double scale) const
inlineconstexpr

Definition at line 73 of file types.hpp.

◆ to_cm()

double libstp::foundation::Meters::to_cm ( ) const
inlineconstexpr

Definition at line 64 of file types.hpp.

◆ to_mm()

double libstp::foundation::Meters::to_mm ( ) const
inlineconstexpr

Definition at line 65 of file types.hpp.

Member Data Documentation

◆ value

double libstp::foundation::Meters::value {0.0}

Definition at line 56 of file types.hpp.


The documentation for this struct was generated from the following file:
  • /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-foundation/include/foundation/types.hpp