#include <limits>
#include "platform.h"
Go to the source code of this file.
|
template<class T > |
bool | NearlyEqual (T x, T y, T tolerance) |
|
◆ NearlyEqual()
template<class T >
bool NearlyEqual |
( |
T |
x, |
|
|
T |
y, |
|
|
T |
tolerance |
|
) |
| |
Definition at line 37 of file host.h.
37 {
38 T diff = x - y;
39 return diff <= tolerance && -diff <= tolerance;
40}