Image

Imagelupinehunter wrote in Imagecpp

floating point epsilon

I remember seeing a couple of floating point epsilon macros defined in some header files, ubt I'm not sure which one is portable and which one is not. I mostly use something like #define EPSILON 0.0000001 and whenever I need to check for (almost) equality between floats I check if difference is smaller than epsilon or not.

The question is, is there a standard and portable macro or function to give a sane epsilon value to me? does C++ standard have something like this?