mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
mrs_lib::geometry::radians Struct Reference

Convenience specialization of the cyclic class for unsigned radians (from $0$ to $2\pi$). More...

#include <cyclic.h>

+ Inheritance diagram for mrs_lib::geometry::radians:
+ Collaboration diagram for mrs_lib::geometry::radians:

Static Public Attributes

static constexpr double minimum = 0
 
static constexpr double supremum = 2 * M_PI
 
- Static Public Attributes inherited from mrs_lib::geometry::cyclic< double, radians >
static constexpr double minimum
 Minimum of the valid interval of wrapped values $ m $.
 
static constexpr double supremum
 Supremum of the valid interval of wrapped values $ s $.
 
static constexpr double range
 Range of the valid interval of wrapped values $ r $ (also the period of the cyclic quantity).
 
static constexpr double half_range
 Half of the range of the valid interval of wrapped values $ r/2 $ (used for some calculations).
 

Additional Inherited Members

- Public Member Functions inherited from mrs_lib::geometry::cyclic< double, radians >
 cyclic ()
 Default constructor. More...
 
 cyclic (const double val)
 Constructor overload. More...
 
 cyclic (const cyclic &other)
 Copy constructor. More...
 
 cyclic (const radians &other)
 Copy constructor. More...
 
double value () const
 Getter for val. More...
 
other_t convert () const
 Conversion between two different circular quantities. More...
 
cyclicoperator= (const double nval)
 Assignment operator. More...
 
cyclicoperator= (const cyclic &other)
 Assignment operator. More...
 
cyclicoperator= (cyclic &&other)
 Move operator. More...
 
cyclicoperator+= (const cyclic &other)
 Addition compound operator. More...
 
cyclicoperator-= (const cyclic &other)
 Subtraction compound operator. More...
 
- Static Public Member Functions inherited from mrs_lib::geometry::cyclic< double, radians >
static bool inRange (const double val)
 Checks if val is within the valid interval of wrapped values. More...
 
static double wrap (const double val)
 Returns val, converted to the valid interval of values. More...
 
static double unwrap (const double what, const double from)
 Returns value of the parameter what modified so that there is no "jump" between from and \t what. More...
 
static double pdist (const double from, const double to)
 Returns length of the shortest walk in the positive direction from the first parameter to the second one. More...
 
static double pdist (const cyclic from, const cyclic to)
 
static double diff (const double minuend, const double subtrahend)
 Returns the difference between the two circular values. More...
 
static double diff (const cyclic minuend, const cyclic subtrahend)
 
static double dist (const double from, const double to)
 Returns the distance between the two circular values. More...
 
static double dist (const cyclic from, const cyclic to)
 
static double interpUnwrapped (const double from, const double to, const double coeff)
 Interpolation between two circular quantities without wrapping of the result. More...
 
static double interpUnwrapped (const cyclic from, const cyclic to, const double coeff)
 
static double interp (const double from, const double to, const double coeff)
 Interpolation between two circular quantities. More...
 
static double interp (const cyclic from, const cyclic to, const double coeff)
 
static double pinterpUnwrapped (const double from, const double to, const double coeff)
 Interpolation between two circular quantities in the positive direction without wrapping of the result. More...
 
static double pinterpUnwrapped (const cyclic from, const cyclic to, const double coeff)
 
static double pinterp (const double from, const double to, const double coeff)
 Interpolation between two circular quantities in the positive direction. More...
 
static double pinterp (const cyclic from, const cyclic to, const double coeff)
 
static other_t convert (const cyclic &what)
 Conversion between two different circular quantities. More...
 
- Protected Attributes inherited from mrs_lib::geometry::cyclic< double, radians >
double val
 

Detailed Description

Convenience specialization of the cyclic class for unsigned radians (from $0$ to $2\pi$).

Examples
geometry/cyclic_example.cpp.

The documentation for this struct was generated from the following file: