From 07ceb99213166b678f0a0bac9c35e9897f22e827 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Dec 2013 03:46:27 +1100 Subject: Code Cleanup: use strict flags for math lib, add inline declarations --- source/blender/blenlib/BLI_math_base.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/blender/blenlib/BLI_math_base.h') diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index 14c1055cd3a..6d37f794ce2 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -139,6 +139,9 @@ static const int NAN_INT = 0x7FC00000; #ifndef hypotf #define hypotf(a, b) ((float)hypot(a, b)) #endif +#ifndef copysignf +#define copysignf(a, b) ((float)copysign(a, b)) +#endif #endif /* C99 or POSIX.1-2001 */ @@ -214,9 +217,17 @@ MINLINE float interpf(float a, float b, float t); MINLINE float min_ff(float a, float b); MINLINE float max_ff(float a, float b); +MINLINE float min_fff(float a, float b, float c); +MINLINE float max_fff(float a, float b, float c); +MINLINE float min_ffff(float a, float b, float c, float d); +MINLINE float max_ffff(float a, float b, float c, float d); MINLINE int min_ii(int a, int b); MINLINE int max_ii(int a, int b); +MINLINE int min_iii(int a, int b, int c); +MINLINE int max_iii(int a, int b, int c); +MINLINE int min_iiii(int a, int b, int c, int d); +MINLINE int max_iiii(int a, int b, int c, int d); MINLINE float signf(float f); @@ -230,6 +241,9 @@ MINLINE int power_of_2_min_i(int n); MINLINE int divide_round_i(int a, int b); MINLINE int mod_i(int i, int n); +MINLINE unsigned int highest_order_bit_i(unsigned int n); +MINLINE unsigned short highest_order_bit_s(unsigned short n); + MINLINE float shell_angle_to_dist(const float angle); #if (defined(WIN32) || defined(WIN64)) && !defined(FREE_WINDOWS) -- cgit v1.2.3