tesseract  5.0.0-alpha-619-ge9db
host.h File Reference
#include <limits>
#include <tesseract/platform.h>

Go to the source code of this file.

Functions

template<class T >
bool NearlyEqual (T x, T y, T tolerance)
 

Function Documentation

◆ NearlyEqual()

template<class T >
bool NearlyEqual ( x,
y,
tolerance 
)

Definition at line 36 of file host.h.

37  {
38  T diff = x - y;
39  return diff <= tolerance && -diff <= tolerance;