Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r--source/blender/blenlib/BLI_math_base.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index af301386920..c143c44c594 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
@@ -37,6 +37,7 @@ extern "C" {
#endif
#include <math.h>
+#include "BLI_math_inline.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
@@ -130,23 +131,30 @@ extern "C" {
#define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c)
#endif
+#ifdef BLI_MATH_INLINE
+#include "intern/math_base_inline.c"
+#endif
+
/******************************* Float ******************************/
-float sqrt3f(float f);
-double sqrt3d(double d);
+MINLINE float sqrt3f(float f);
+MINLINE double sqrt3d(double d);
+
+MINLINE float saacosf(float f);
+MINLINE float saasinf(float f);
+MINLINE float sasqrtf(float f);
+MINLINE float saacos(float fac);
+MINLINE float saasin(float fac);
+MINLINE float sasqrt(float fac);
-float saacosf(float f);
-float saasinf(float f);
-float sasqrtf(float f);
-float saacos(float fac);
-float saasin(float fac);
-float sasqrt(float fac);
+MINLINE float interpf(float a, float b, float t);
-float interpf(float a, float b, float t);
+MINLINE float minf(float a, float b);
+MINLINE float maxf(float a, float b);
-float power_of_2(float f);
+MINLINE float power_of_2(float f);
-float shell_angle_to_dist(float angle);
+MINLINE float shell_angle_to_dist(float angle);
double double_round(double x, int ndigits);