modm API documentation
modm::Tolerance Class Reference

#include <modm/math/tolerance.hpp>

Static Public Member Functions

static constexpr int64_t absoluteError (uint32_t reference, uint32_t actual)
static constexpr float relativeError (uint32_t reference, uint32_t actual)
static constexpr bool isErrorInTolerance (float error, percent_t tolerance)
static constexpr bool isValueInTolerance (uint32_t reference, uint32_t actual, percent_t tolerance)
template<uint32_t reference, uint32_t actual, percent_t tolerance>
static void assertValueInTolerance ()

Detailed Description

This class checks if values are within a certain tolerance.

This can be used to guarantee the quality of certain parameters, mostly baudrate or datarate.

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