Files
test2/source/blender/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
..
2012-07-04 20:47:12 +00:00
2015-02-14 08:00:41 +11:00
2015-02-14 08:00:41 +11:00
2014-08-07 14:42:47 +10:00
2015-04-04 10:37:38 +11:00
2015-07-09 19:33:02 +10:00
2015-06-11 17:20:29 +02:00
2015-06-19 20:19:37 +10:00
2015-06-15 19:56:43 +10:00
2013-10-31 14:10:01 +00:00
2012-05-05 00:58:22 +00:00
2015-06-16 10:03:12 +10:00
2015-06-13 03:23:58 +10:00