Mesa (master): mesa: Add definitions for inverse hyperbolic function on MSVC.

Vinson Lee vlee at kemper.freedesktop.org
Tue Nov 16 06:01:54 UTC 2010


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

Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Nov 15 22:00:32 2010 -0800

mesa: Add definitions for inverse hyperbolic function on MSVC.

---

 src/mesa/main/imports.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 5d4ef9b..5ea647a 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -150,6 +150,9 @@ typedef union { GLfloat f; GLint i; } fi_type;
 static INLINE float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
 static INLINE float exp2f(float x) { return powf(2.0f, x); }
 static INLINE float log2f(float x) { return logf(x) * 1.442695041f; }
+static INLINE float asinhf(float x) { return logf(x + sqrtf(x * x + 1.0f)); }
+static INLINE float acoshf(float x) { return logf(x + sqrtf(x * x - 1.0f)); }
+static INLINE float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) / 2.0f; }
 static INLINE int isblank(int ch) { return ch == ' ' || ch == '\t'; }
 #define strtoll(p, e, b) _strtoi64(p, e, b)
 #endif




More information about the mesa-commit mailing list