aboutsummaryrefslogtreecommitdiff
path: root/src/raymath.h
diff options
context:
space:
mode:
authorvictorfisac <victorfisac@gmail.com>2016-06-11 18:29:01 +0200
committervictorfisac <victorfisac@gmail.com>2016-06-11 18:29:01 +0200
commit1a60f376a4ebe4d0053a6ea308ee2b399d8c345d (patch)
tree2168bb09d221f2478e3371b296106700c130a0e4 /src/raymath.h
parent77f599885dade4930fb01baca22db6e2ae0c9f20 (diff)
parent27ba7de1e4a9d262b2f3039433977d6cffa1da8d (diff)
downloadraylib-1a60f376a4ebe4d0053a6ea308ee2b399d8c345d.tar.gz
raylib-1a60f376a4ebe4d0053a6ea308ee2b399d8c345d.zip
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'src/raymath.h')
-rw-r--r--src/raymath.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/raymath.h b/src/raymath.h
index 4075a1a9..10eabb6b 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -47,10 +47,16 @@
#include "raylib.h" // Required for structs: Vector3, Matrix
#endif
+#ifdef __cplusplus
+ #define RMEXTERN extern "C" // Functions visible from other files (no name mangling of functions in C++)
+#else
+ #define RMEXTERN extern // Functions visible from other files
+#endif
+
#if defined(RAYMATH_EXTERN_INLINE)
- #define RMDEF extern inline
+ #define RMDEF RMEXTERN inline // Functions are embeded inline (compiler generated code)
#else
- #define RMDEF extern
+ #define RMDEF RMEXTERN
#endif
//----------------------------------------------------------------------------------
@@ -105,10 +111,6 @@ typedef struct Quaternion {
#ifndef RAYMATH_EXTERN_INLINE
-#ifdef __cplusplus
-extern "C" {
-#endif
-
//------------------------------------------------------------------------------------
// Functions Declaration to work with Vector3
//------------------------------------------------------------------------------------
@@ -166,10 +168,6 @@ RMDEF Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle); // Returns
RMDEF void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle); // Returns the rotation angle and axis for a given quaternion
RMDEF void QuaternionTransform(Quaternion *q, Matrix mat); // Transform a quaternion given a transformation matrix
-#ifdef __cplusplus
-}
-#endif
-
#endif // notdef RAYMATH_EXTERN_INLINE
#endif // RAYMATH_H