Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
trap::algorithms::WrappedFloat< Unit > Class Template Reference

#include <wrapped_float.hpp>

Public Types

using TappedFloat = tap::algorithms::WrappedFloat
 

Public Member Functions

 WrappedFloat (Unit value, Unit lowerBound, Unit upperBound)
 
 WrappedFloat (const tap::algorithms::WrappedFloat &wrappedFloat)
 
bool operator== (const WrappedFloat &other) const
 
void operator+= (const WrappedFloat &other)
 
void operator-= (const WrappedFloat &other)
 
WrappedFloat operator+ (const WrappedFloat &other) const
 
WrappedFloat operator- (const WrappedFloat &other) const
 
Unit minDifference (const WrappedFloat &other) const
 
Unit minDifference (const Unit &unwrappedValue) const
 
void shiftBounds (Unit shiftMagnitude)
 
bool withinRange (const WrappedFloat &lowerBound, const WrappedFloat upperBound) const
 
Unit getUnwrappedValue () const
 
Unit getWrappedValue () const
 
void setWrappedValue (const Unit &newValue)
 
void setUnwrappedValue (const Unit &newValue)
 
WrappedFloat getNormalized () const
 
int getRevolutions () const
 
Unit getUpperBound () const
 
Unit getLowerBound () const
 
 operator double () const
 
 operator Unit () const
 

Static Public Member Functions

static Unit limitValue (const WrappedFloat &valueToLimit, const Unit min, const Unit max, int *status)
 
static Unit limitValue (const WrappedFloat &valueToLimit, const WrappedFloat &min, const WrappedFloat &max, int *status)
 
static Unit rangeOverlap (const WrappedFloat &lowerA, const WrappedFloat &upperA, const WrappedFloat &lowerB, const WrappedFloat &upperB)
 

Detailed Description

template<typename Unit>
class trap::algorithms::WrappedFloat< Unit >

This is a wrappedFloat but uses units instead https://aruw.gitlab.io/controls/taproot/api/classtap_1_1algorithms_1_1_wrapped_float.html#exhale-class-classtap-1-1algorithms-1-1-wrapped-float

Member Typedef Documentation

◆ TappedFloat

template<typename Unit >
using trap::algorithms::WrappedFloat< Unit >::TappedFloat = tap::algorithms::WrappedFloat

Constructor & Destructor Documentation

◆ WrappedFloat() [1/2]

template<typename Unit >
trap::algorithms::WrappedFloat< Unit >::WrappedFloat ( Unit  value,
Unit  lowerBound,
Unit  upperBound 
)
inline

◆ WrappedFloat() [2/2]

template<typename Unit >
trap::algorithms::WrappedFloat< Unit >::WrappedFloat ( const tap::algorithms::WrappedFloat< Unit > &  wrappedFloat)
inline

Member Function Documentation

◆ getLowerBound()

template<typename Unit >
Unit trap::algorithms::WrappedFloat< Unit >::getLowerBound ( ) const
inline

◆ getNormalized()

template<typename Unit >
WrappedFloat trap::algorithms::WrappedFloat< Unit >::getNormalized ( ) const
inline

◆ getRevolutions()

template<typename Unit >
int trap::algorithms::WrappedFloat< Unit >::getRevolutions ( ) const
inline

◆ getUnwrappedValue()

template<typename Unit >
Unit trap::algorithms::WrappedFloat< Unit >::getUnwrappedValue ( ) const
inline

◆ getUpperBound()

template<typename Unit >
Unit trap::algorithms::WrappedFloat< Unit >::getUpperBound ( ) const
inline

◆ getWrappedValue()

template<typename Unit >
Unit trap::algorithms::WrappedFloat< Unit >::getWrappedValue ( ) const
inline

◆ limitValue() [1/2]

template<typename Unit >
static Unit trap::algorithms::WrappedFloat< Unit >::limitValue ( const WrappedFloat< Unit > &  valueToLimit,
const Unit  min,
const Unit  max,
int *  status 
)
inlinestatic

◆ limitValue() [2/2]

template<typename Unit >
static Unit trap::algorithms::WrappedFloat< Unit >::limitValue ( const WrappedFloat< Unit > &  valueToLimit,
const WrappedFloat< Unit > &  min,
const WrappedFloat< Unit > &  max,
int *  status 
)
inlinestatic

◆ minDifference() [1/2]

template<typename Unit >
Unit trap::algorithms::WrappedFloat< Unit >::minDifference ( const Unit &  unwrappedValue) const
inline

◆ minDifference() [2/2]

template<typename Unit >
Unit trap::algorithms::WrappedFloat< Unit >::minDifference ( const WrappedFloat< Unit > &  other) const
inline

◆ operator double()

template<typename Unit >
trap::algorithms::WrappedFloat< Unit >::operator double ( ) const
inline

◆ operator Unit()

template<typename Unit >
trap::algorithms::WrappedFloat< Unit >::operator Unit ( ) const
inline

◆ operator+()

template<typename Unit >
WrappedFloat trap::algorithms::WrappedFloat< Unit >::operator+ ( const WrappedFloat< Unit > &  other) const
inline

◆ operator+=()

template<typename Unit >
void trap::algorithms::WrappedFloat< Unit >::operator+= ( const WrappedFloat< Unit > &  other)
inline

◆ operator-()

template<typename Unit >
WrappedFloat trap::algorithms::WrappedFloat< Unit >::operator- ( const WrappedFloat< Unit > &  other) const
inline

◆ operator-=()

template<typename Unit >
void trap::algorithms::WrappedFloat< Unit >::operator-= ( const WrappedFloat< Unit > &  other)
inline

◆ operator==()

template<typename Unit >
bool trap::algorithms::WrappedFloat< Unit >::operator== ( const WrappedFloat< Unit > &  other) const
inline

◆ rangeOverlap()

template<typename Unit >
static Unit trap::algorithms::WrappedFloat< Unit >::rangeOverlap ( const WrappedFloat< Unit > &  lowerA,
const WrappedFloat< Unit > &  upperA,
const WrappedFloat< Unit > &  lowerB,
const WrappedFloat< Unit > &  upperB 
)
inlinestatic

◆ setUnwrappedValue()

template<typename Unit >
void trap::algorithms::WrappedFloat< Unit >::setUnwrappedValue ( const Unit &  newValue)
inline

◆ setWrappedValue()

template<typename Unit >
void trap::algorithms::WrappedFloat< Unit >::setWrappedValue ( const Unit &  newValue)
inline

◆ shiftBounds()

template<typename Unit >
void trap::algorithms::WrappedFloat< Unit >::shiftBounds ( Unit  shiftMagnitude)
inline

◆ withinRange()

template<typename Unit >
bool trap::algorithms::WrappedFloat< Unit >::withinRange ( const WrappedFloat< Unit > &  lowerBound,
const WrappedFloat< Unit >  upperBound 
) const
inline

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