KiCad PCB EDA Suite
Loading...
Searching...
No Matches
numeric.h File Reference

Numerical test predicates. More...

#include <cmath>

Go to the source code of this file.

Namespaces

namespace  KI_TEST
 

Functions

template<typename T >
bool KI_TEST::IsWithinWrapped (T aValue, T aNominal, T aWrap, T aError)
 Check if a value is within a tolerance of a nominal value, wrapping to a given val.
 
template<typename T >
bool KI_TEST::IsWithin (T aValue, T aNominal, T aError)
 Check if a value is within a tolerance of a nominal value.
 
template<typename T >
bool KI_TEST::IsWithinBounds (T aValue, T aNominal, T aErrorAbove, T aErrorBelow)
 Check if a value is within a tolerance of a nominal value, with different allowances for errors above and below.
 
template<typename T >
bool KI_TEST::IsWithinAndBelow (T aValue, T aNominal, T aErrorBelow)
 value is in range [aNominal - aErrorBelow, aNominal]
 
template<typename T >
bool KI_TEST::IsWithinAndAbove (T aValue, T aNominal, T aErrorAbove)
 value is in range [aNominal, aNominal + aErrorAbove]
 

Detailed Description

Numerical test predicates.

Definition in file numeric.h.