blender/tests/gtests/blenlib
Bastien Montagne 7837f0e833 BLI_math 'compare' cleanup & enhancements.
This commit:
* Adds a 'compare_ff' function for absolute 'almost equal' comparison of floats.
* Makes 'compare_vxvx' functions use that new 'compare_ff' one.
* Adds a 'compare_ff_relative' function for secured ulp-based relative comparison of floats.
* Adds matching 'compare_vxvx_relative' functions.
* Adds some basic tests for compare_ff_relative.

See https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/

Note that we could replace our python/mathutils' EXPP_FloatsAreEqual() by BLI's compare_ff_relative
(using a very small absolute max_diff), but these do not have exact same behavior...
Left a comment there for now, we can do it later if/when we are sure it won't break anything!
2015-07-10 15:02:43 +02:00
..
BLI_ghash_performance_test.cc Cleanup: int/uint mismatch in printf... 2015-06-27 11:02:58 +02:00
BLI_ghash_test.cc BLI GHash: add some basic gtests. 2015-03-19 19:50:51 +01:00
BLI_hash_mm2a_test.cc Add Murmur2A hashing feature to BLI 2014-11-14 11:00:26 +01:00
BLI_listbase_test.cc GTest: add test for listbase sorting 2015-06-10 20:26:56 +10:00
BLI_math_base_test.cc BLI_math 'compare' cleanup & enhancements. 2015-07-10 15:02:43 +02:00
BLI_math_color_test.cc Cleanup: test naming 2014-07-19 20:02:14 +10:00
BLI_math_geom_test.cc Cleanup: test naming 2014-07-19 20:02:14 +10:00
BLI_path_util_test.cc Add some BLI helpers needed by asset branch. 2015-01-03 10:13:44 +01:00
BLI_polyfill2d_test.cc Refactor array_utils out of BLI_array 2015-02-14 08:00:41 +11:00
BLI_ressource_strings.h GTest: add test for listbase sorting 2015-06-10 20:26:56 +10:00
BLI_stack_test.cc BLI_stack: gtest for clear 2015-06-03 18:09:12 +10:00
BLI_string_test.cc Cleanup: all params of BLI_str partition funcs can be const... 2015-06-27 11:00:47 +02:00
CMakeLists.txt BLI_math 'compare' cleanup & enhancements. 2015-07-10 15:02:43 +02:00