diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:29:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:29:01 +0000 |
commit | 35a96bde514a8897f6f0fcc41c5833bf63df2e2a (patch) | |
tree | 657d15a03cc46bd099fc2c6546a7a4ad43815d9f /src/3rdparty/autotrace/epsilon-equal.h | |
parent | Initial commit. (diff) | |
download | inkscape-35a96bde514a8897f6f0fcc41c5833bf63df2e2a.tar.xz inkscape-35a96bde514a8897f6f0fcc41c5833bf63df2e2a.zip |
Adding upstream version 1.0.2.upstream/1.0.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/3rdparty/autotrace/epsilon-equal.h')
-rw-r--r-- | src/3rdparty/autotrace/epsilon-equal.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/3rdparty/autotrace/epsilon-equal.h b/src/3rdparty/autotrace/epsilon-equal.h new file mode 100644 index 0000000..8b547ba --- /dev/null +++ b/src/3rdparty/autotrace/epsilon-equal.h @@ -0,0 +1,17 @@ +/* epsilon-equal.h: define an error resist compare. */ + +#ifndef EPSILON_EQUAL_H +#define EPSILON_EQUAL_H + +#include "types.h" + +/* Says whether V1 and V2 are within REAL_EPSILON of each other. + Fixed-point arithmetic would be better, to guarantee machine + independence, but it's so much more painful to work with. The value + here is smaller than can be represented in either a `fix_word' or a + `scaled_num', so more precision than this will be lost when we + output, anyway. */ +extern gboolean epsilon_equal(gfloat v1, gfloat v2); +#define REAL_EPSILON 0.00001 + +#endif /* not EPSILON_EQUAL_H */ |