FireSTARR
Loading...
Searching...
No Matches
fs::wx::Direction Class Reference

Direction with access to degrees or radians. More...

#include <Weather.h>

Inheritance diagram for fs::wx::Direction:
Collaboration diagram for fs::wx::Direction:

Public Member Functions

 ~Direction ()=default
 Destructor.
 
constexpr Direction () noexcept=default
 Construct with Direction of 0 (North)
 
constexpr Direction (const MathSize value, const bool is_radians) noexcept
 Constructor.
 
constexpr Direction (const Direction &rhs) noexcept=default
 Copy constructor.
 
constexpr Direction (Direction &&rhs) noexcept=default
 Move constructor.
 
Directionoperator= (const Direction &rhs) noexcept=default
 Copy assignment.
 
Directionoperator= (Direction &&rhs) noexcept=default
 Move assignment.
 
constexpr MathSize asRadians () const
 Direction as radians, where 0 is North and values increase clockwise.
 
constexpr MathSize asDegrees () const
 Direction as degrees, where 0 is North and values increase clockwise.
 
constexpr MathSize heading () const
 Heading (opposite of this direction)
 
- Public Member Functions inherited from fs::data::Index< T >
 ~Index ()=default
 Destructor.
 
constexpr Index () noexcept
 Construct with a value of 0.
 
constexpr Index (const MathSize value) noexcept
 Construct with given value.
 
constexpr Index (Index< T > &&rhs) noexcept=default
 Move constructor.
 
constexpr Index (const Index< T > &rhs) noexcept=default
 Copy constructor.
 
Index< T > & operator= (Index< T > &&rhs) noexcept=default
 Move assignment.
 
Index< T > & operator= (const Index< T > &rhs) noexcept=default
 Copy assignment.
 
constexpr bool operator== (const Index< T > &rhs) const noexcept
 Equality operator.
 
constexpr bool operator!= (const Index< T > &rhs) const noexcept
 Not equals operator.
 
constexpr MathSize asValue () const noexcept
 Returns value as a MathSize.
 
constexpr bool operator< (const Index< T > rhs) const noexcept
 Less than operator.
 
constexpr bool operator> (const Index< T > rhs) const noexcept
 Greater than operator.
 
constexpr bool operator<= (const Index< T > rhs) const noexcept
 Less than or equal to operator.
 
constexpr bool operator>= (const Index< T > rhs) const noexcept
 Greater than or equal to operator.
 
constexpr Index< T > operator+ (const Index< T > rhs) const noexcept
 Addition operator.
 
constexpr Index< T > operator- (const Index< T > rhs) const noexcept
 Subtraction operator.
 
constexpr Index< T > & operator+= (const Index< T > rhs) noexcept
 Addition assignment operator.
 
constexpr Index< T > & operator-= (const Index< T > rhs) noexcept
 Subtraction assignment operator.
 

Static Public Attributes

static const Direction Zero = Direction(0, false)
 Direction of 0 (North)
 
static const Direction Invalid = Direction(-1, false)
 

Detailed Description

Direction with access to degrees or radians.

Constructor & Destructor Documentation

◆ Direction() [1/3]

fs::wx::Direction::Direction ( const MathSize value,
const bool is_radians )
inlineconstexprnoexcept

Constructor.

Parameters
valueDirection to use
is_radiansWhether the given direction is in radians (as opposed to degrees)

◆ Direction() [2/3]

fs::wx::Direction::Direction ( const Direction & rhs)
constexprdefaultnoexcept

Copy constructor.

Parameters
rhsDirection to copy from

◆ Direction() [3/3]

fs::wx::Direction::Direction ( Direction && rhs)
constexprdefaultnoexcept

Move constructor.

Parameters
rhsDirection to move from

Member Function Documentation

◆ asDegrees()

MathSize fs::wx::Direction::asDegrees ( ) const
inlinenodiscardconstexpr

Direction as degrees, where 0 is North and values increase clockwise.

Returns
Direction as degrees, where 0 is North and values increase clockwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ asRadians()

MathSize fs::wx::Direction::asRadians ( ) const
inlinenodiscardconstexpr

Direction as radians, where 0 is North and values increase clockwise.

Returns
Direction as radians, where 0 is North and values increase clockwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ heading()

MathSize fs::wx::Direction::heading ( ) const
inlinenodiscardconstexpr

Heading (opposite of this direction)

Returns
Heading (opposite of this direction)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

Direction & fs::wx::Direction::operator= ( const Direction & rhs)
defaultnoexcept

Copy assignment.

Parameters
rhsDirection to copy from
Returns
This, after assignment

◆ operator=() [2/2]

Direction & fs::wx::Direction::operator= ( Direction && rhs)
defaultnoexcept

Move assignment.

Parameters
rhsDirection to move from
Returns
This, after assignment

The documentation for this class was generated from the following files: