diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-19 03:12:28 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-19 03:12:28 +0000 |
commit | 1fd361a1ea06e44286c213ca1f814f49306fdc43 (patch) | |
tree | 64c8c96cf54d8718847339a403e5e67b922e8c3f /converter/other/pamtosvg/epsilon-equal.h | |
download | netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.gz netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.xz netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.zip |
Create Subversion repository
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/pamtosvg/epsilon-equal.h')
-rw-r--r-- | converter/other/pamtosvg/epsilon-equal.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/converter/other/pamtosvg/epsilon-equal.h b/converter/other/pamtosvg/epsilon-equal.h new file mode 100644 index 00000000..fa0437cd --- /dev/null +++ b/converter/other/pamtosvg/epsilon-equal.h @@ -0,0 +1,20 @@ +/* epsilon-equal.h: define an error resist compare. */ + +#ifndef EPSILON_EQUAL_H +#define EPSILON_EQUAL_H + +#include "pm_c_util.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. */ +bool epsilon_equal(float const v1, + float const v2); + +#define REAL_EPSILON 0.00001 + +#endif /* not EPSILON_EQUAL_H */ + |