Smartcar Shield
Loading...
Searching...
No Matches
Namespaces | Functions
Utilities.hpp File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  smartcarlib
 
namespace  smartcarlib::utils
 

Functions

template<typename AnyNumber >
constexpr AnyNumber smartcarlib::utils::getAbsolute (AnyNumber number)
 Gets the absolute of the supplied number.
 
template<typename AnyNumber >
constexpr AnyNumber smartcarlib::utils::getConstrain (AnyNumber number, AnyNumber min, AnyNumber max)
 Limit the number between a range.
 
template<typename AnyNumber >
AnyNumber smartcarlib::utils::getMedian (AnyNumber unsortedNumbers[], const unsigned int &arraySize)
 Gets the median value out of the supplied number array.
 
template<typename AnyNumber >
constexpr AnyNumber smartcarlib::utils::getMap (AnyNumber valueToMap, AnyNumber fromLow, AnyNumber fromHigh, AnyNumber toLow, AnyNumber toHigh)
 Maps a value from a range to another.
 
constexpr bool smartcarlib::utils::areAlmostEqual (float a, float b)
 Compares two floating point numbers.