PX4 Firmware
PX4 Autopilot Software http://px4.io
Limits.hpp File Reference

Limiting / constrain helper functions. More...

#include <float.h>
#include <math.h>
#include <stdint.h>
Include dependency graph for Limits.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 math
 

Macros

#define MATH_PI   3.141592653589793238462643383280
 

Functions

template<typename _Tp >
constexpr _Tp math::min (_Tp a, _Tp b)
 
template<typename _Tp >
constexpr _Tp math::max (_Tp a, _Tp b)
 
template<typename _Tp >
constexpr _Tp math::constrain (_Tp val, _Tp min_val, _Tp max_val)
 
constexpr int16_t math::constrainFloatToInt16 (float value)
 Constrain float values to valid values for int16_t. More...
 
template<typename _Tp >
constexpr bool math::isInRange (_Tp val, _Tp min_val, _Tp max_val)
 
template<typename T >
constexpr T math::radians (T degrees)
 
template<typename T >
constexpr T math::degrees (T radians)
 
bool math::isZero (float val)
 Safe way to check if float is zero. More...
 
bool math::isZero (double val)
 Safe way to check if double is zero. More...
 

Detailed Description

Limiting / constrain helper functions.

Definition in file Limits.hpp.

Macro Definition Documentation

◆ MATH_PI

#define MATH_PI   3.141592653589793238462643383280

Definition at line 47 of file Limits.hpp.

Referenced by math::degrees(), and math::radians().