LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
RQuantity.hpp File Reference
#include <cmath>
#include <ratio>

Go to the source code of this file.

Classes

class  okapi::RQuantity< MassDim, LengthDim, TimeDim, AngleDim >
 

Namespaces

namespace  okapi
 
namespace  okapi::literals
 

Macros

#define QUANTITY_TYPE(_Mdim, _Ldim, _Tdim, _Adim, name)
 
#define ConvertTo(_x, _y)   (_x).convert(1.0_##_y)
 

Functions

constexpr Number okapi::number (1.0)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::operator+ (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::operator- (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< std::ratio_add< M1, M2 >, std::ratio_add< L1, L2 >, std::ratio_add< T1, T2 >, std::ratio_add< A1, A2 > > okapi::operator* (const RQuantity< M1, L1, T1, A1 > &lhs, const RQuantity< M2, L2, T2, A2 > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::operator* (const double &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::operator* (const RQuantity< M, L, T, A > &lhs, const double &rhs)
 
template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< std::ratio_subtract< M1, M2 >, std::ratio_subtract< L1, L2 >, std::ratio_subtract< T1, T2 >, std::ratio_subtract< A1, A2 > > okapi::operator/ (const RQuantity< M1, L1, T1, A1 > &lhs, const RQuantity< M2, L2, T2, A2 > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_subtract< std::ratio< 0 >, M >, std::ratio_subtract< std::ratio< 0 >, L >, std::ratio_subtract< std::ratio< 0 >, T >, std::ratio_subtract< std::ratio< 0 >, A > > okapi::operator/ (const double &x, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::operator/ (const RQuantity< M, L, T, A > &rhs, const double &x)
 
template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator== (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator!= (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator<= (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator>= (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator< (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr bool okapi::operator> (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::abs (const RQuantity< M, L, T, A > &rhs)
 
template<typename R , typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, R >, std::ratio_multiply< L, R >, std::ratio_multiply< T, R >, std::ratio_multiply< A, R > > okapi::pow (const RQuantity< M, L, T, A > &lhs)
 
template<int R, typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< R > >, std::ratio_multiply< L, std::ratio< R > >, std::ratio_multiply< T, std::ratio< R > >, std::ratio_multiply< A, std::ratio< R > > > okapi::pow (const RQuantity< M, L, T, A > &lhs)
 
template<int R, typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< R > >, std::ratio_divide< L, std::ratio< R > >, std::ratio_divide< T, std::ratio< R > >, std::ratio_divide< A, std::ratio< R > > > okapi::root (const RQuantity< M, L, T, A > &lhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< 2 > >, std::ratio_divide< L, std::ratio< 2 > >, std::ratio_divide< T, std::ratio< 2 > >, std::ratio_divide< A, std::ratio< 2 > > > okapi::sqrt (const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_divide< M, std::ratio< 3 > >, std::ratio_divide< L, std::ratio< 3 > >, std::ratio_divide< T, std::ratio< 3 > >, std::ratio_divide< A, std::ratio< 3 > > > okapi::cbrt (const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< 2 > >, std::ratio_multiply< L, std::ratio< 2 > >, std::ratio_multiply< T, std::ratio< 2 > >, std::ratio_multiply< A, std::ratio< 2 > > > okapi::square (const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio_multiply< M, std::ratio< 3 > >, std::ratio_multiply< L, std::ratio< 3 > >, std::ratio_multiply< T, std::ratio< 3 > >, std::ratio_multiply< A, std::ratio< 3 > > > okapi::cube (const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::hypot (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::mod (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M1 , typename L1 , typename T1 , typename A1 , typename M2 , typename L2 , typename T2 , typename A2 >
constexpr RQuantity< M1, L1, T1, A1 > okapi::copysign (const RQuantity< M1, L1, T1, A1 > &lhs, const RQuantity< M2, L2, T2, A2 > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::ceil (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::floor (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::trunc (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< M, L, T, Aokapi::round (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 
constexpr Number okapi::sin (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr Number okapi::cos (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr Number okapi::tan (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::asin (const Number &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::acos (const Number &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::atan (const Number &rhs)
 
constexpr Number okapi::sinh (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr Number okapi::cosh (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr Number okapi::tanh (const RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::asinh (const Number &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::acosh (const Number &rhs)
 
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::atanh (const Number &rhs)
 
template<typename M , typename L , typename T , typename A >
constexpr RQuantity< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 >, std::ratio< 1 > > okapi::atan2 (const RQuantity< M, L, T, A > &lhs, const RQuantity< M, L, T, A > &rhs)
 

Macro Definition Documentation

◆ ConvertTo

#define ConvertTo (   _x,
  _y 
)    (_x).convert(1.0_##_y)

Definition at line 419 of file RQuantity.hpp.

◆ QUANTITY_TYPE

#define QUANTITY_TYPE (   _Mdim,
  _Ldim,
  _Tdim,
  _Adim,
  name 
)
Value:
typedef RQuantity<std::ratio<_Mdim>, std::ratio<_Ldim>, std::ratio<_Tdim>, std::ratio<_Adim>> \
name;

Definition at line 84 of file RQuantity.hpp.