Add fuzzy floating point comparison macro0b4c2eefce87bfbe75bd022e2dd84e0147d5fe3235/head
commit0b4c2eefce87bfbe75bd022e2dd84e0147d5fe32
authorEmmanuele Bassi <ebassi@gnome.org>
Wed, 8 Feb 2017 17:20:41 +0000 (8 17:20 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 29 May 2018 09:02:47 +0000 (29 10:02 +0100)
tree82eccd81eaa44e5013ade46bf27f96cb22dea5ae
parent24e98e38d616f64d68c86747dc38e657145bf38b
Add fuzzy floating point comparison macro

Add a test macro that allows comparing two floating point values for
equality within a certain tolerance.

This macro has been independently reimplemented by various projects:

 * Clutter
 * Graphene
 * colord

https://gitlab.gnome.org/GNOME/glib/issues/914
docs/reference/glib/glib-sections.txt
glib/gtestutils.c
glib/gtestutils.h
glib/tests/testing.c