diff options
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_base.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index e877503e835..9b54f780296 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -172,6 +172,9 @@ MINLINE size_t clamp_z(size_t value, size_t min, size_t max); MINLINE int compare_ff(float a, float b, const float max_diff); MINLINE int compare_ff_relative(float a, float b, const float max_diff, const int max_ulps); +MINLINE bool compare_threshold_relative(const float value1, + const float value2, + const float thresh); MINLINE float signf(float f); MINLINE int signum_i_ex(float a, float eps); @@ -196,6 +199,8 @@ MINLINE unsigned int log2_ceil_u(unsigned int x); MINLINE int divide_round_i(int a, int b); MINLINE int mod_i(int i, int n); +MINLINE float round_to_even(float f); + MINLINE signed char round_fl_to_char(float a); MINLINE unsigned char round_fl_to_uchar(float a); MINLINE short round_fl_to_short(float a); |