Blame converter/other/pamtosvg/epsilon-equal.h

Packit 78deda
/* epsilon-equal.h: define an error resist compare. */
Packit 78deda
Packit 78deda
#ifndef EPSILON_EQUAL_H
Packit 78deda
#define EPSILON_EQUAL_H
Packit 78deda
Packit 78deda
#include "pm_c_util.h"
Packit 78deda
Packit 78deda
/* Says whether V1 and V2 are within REAL_EPSILON of each other.
Packit 78deda
   Fixed-point arithmetic would be better, to guarantee machine
Packit 78deda
   independence, but it's so much more painful to work with.  The value
Packit 78deda
   here is smaller than can be represented in either a `fix_word' or a
Packit 78deda
   `scaled_num', so more precision than this will be lost when we
Packit 78deda
   output, anyway.  */
Packit 78deda
bool epsilon_equal(float const v1,
Packit 78deda
                   float const v2);
Packit 78deda
Packit 78deda
#define REAL_EPSILON 0.00001
Packit 78deda
Packit 78deda
#endif /* not EPSILON_EQUAL_H */
Packit 78deda