Mesa (master): c99_math.h: add defines for M_PI, M_E, M_LOG2E

Brian Paul brianp at kemper.freedesktop.org
Fri Feb 27 14:05:47 UTC 2015


Module: Mesa
Branch: master
Commit: 06ed81044fc6b1dee90e67de314f81150746e104
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=06ed81044fc6b1dee90e67de314f81150746e104

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Feb 26 12:31:45 2015 -0700

c99_math.h: add defines for M_PI, M_E, M_LOG2E

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89342
Signed-off-by: Brian Paul <brianp at vmware.com>

---

 include/c99_math.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/c99_math.h b/include/c99_math.h
index 0a359eb..35173c6 100644
--- a/include/c99_math.h
+++ b/include/c99_math.h
@@ -144,4 +144,17 @@ llrintf(float f)
 #endif
 
 
+#ifndef M_PI
+#define M_PI (3.14159265358979323846)
+#endif
+
+#ifndef M_E
+#define M_E (2.7182818284590452354)
+#endif
+
+#ifndef M_LOG2E
+#define M_LOG2E (1.4426950408889634074)
+#endif
+
+
 #endif /* #define _C99_MATH_H_ */




More information about the mesa-commit mailing list