aboutsummaryrefslogtreecommitdiff
path: root/Gem/develop/include/Gem/Utils/GemMath.h
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-03-17 22:38:45 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-03-17 22:38:45 +0000
commit356f94fc355f36c16e48555d10c2377dff4b7554 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /Gem/develop/include/Gem/Utils/GemMath.h
parent5c694f159b012d1d94bf15bfe580dec52e4fe797 (diff)
Gem 096ed6ef786b7a9d6e11a437ff8526619c89a1fd osx/x86_64
built 'coverity_scan:096ed6ef786b7a9d6e11a437ff8526619c89a1fd' for osx/x86_64
Diffstat (limited to 'Gem/develop/include/Gem/Utils/GemMath.h')
-rw-r--r--Gem/develop/include/Gem/Utils/GemMath.h85
1 files changed, 0 insertions, 85 deletions
diff --git a/Gem/develop/include/Gem/Utils/GemMath.h b/Gem/develop/include/Gem/Utils/GemMath.h
deleted file mode 100644
index 769edec..0000000
--- a/Gem/develop/include/Gem/Utils/GemMath.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-----------------------------------------------------------------
-LOG
- GEM - Graphics Environment for Multimedia
-
- Matrix class
-
- Copyright (c) 1997-1999 Mark Danks. mark@danks.org
- Copyright (c) Günther Geiger. geiger@epy.co.at
- Copyright (c) 2001-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at
- For information on usage and redistribution, and for a DISCLAIMER OF ALL
- WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.
-
------------------------------------------------------------------*/
-
-#ifndef _INCLUDE__GEM_UTILS_GEMMATH_H_
-#define _INCLUDE__GEM_UTILS_GEMMATH_H_
-#include <math.h>
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-#ifdef __APPLE__
-# include <AvailabilityMacros.h>
-# if defined (MAC_OS_X_VERSION_10_3) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
-# else
-
-#define sqrtf(v) (float)sqrt((double)(v))
-#define cosf(v) (float)cos((double)(v))
-#define sinf(v) (float)sin((double)(v))
-#define tanf(v) (float)tan((double)(v))
-#define logf(v) (float)log((double)(v))
-#define expf(v) (float)exp((double)(v))
-
-#define atan2f(v,p) (float)atan2((double)(v), (double)(p))
-#define powf(v,p) (float)pow((double)(v), (double)(p))
-
-# endif /* OSX_10_3 */
-#endif /* __APPLE__ */
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Speedup found via Shark: ppc only
-//
-// If you do not require full precision, you can use the PowerPC floating-point
-// reciprocal square-root estimate instruction (frsqrte) instead of calling sqrt().
-//
-// If needed, you can increase the precision of the estimate returned by
-// frsqrte (5-bits of precision) by using the Newton-Raphson method for improving
-// the estimate (x0) for 1/sqrt(a) (x1 = 0.5 * x0 * [3.0 - a * x0 * x0]).
-///////////////////////////////////////////////////////////////////////////////
-#ifdef __ppc__
-# include <ppc_intrinsics.h>
-# ifdef sqrt
-# undef sqrt
-# endif
-# ifdef sqrtf
-# undef sqrtf
-# endif
-
-# define sqrt fast_sqrtf
-# define sqrtf fast_sqrtf
-
-inline double fast_sqrt(double x)
-{
- register double est = __frsqrte(x);
- return x * 0.5 * est * __fnmsub(est * est, x, 3.0);
-}
-
-inline float fast_sqrtf(float x)
-{
- register float est = (float)__frsqrte(x);
- return x * 0.5f * est * __fnmsubs(est * est, x, 3.0f);
-}
-#endif /* __ppc__ */
-
-#ifdef _WIN32
-/* seems like there is no drand48() on w32 */
-/* JMZ: this should really return "double" instead of "float",
- * but we need only float... */
-# define drand48() ((float)rand())/((float)RAND_MAX)
-#endif /* _WIN32 */
-
-
-#endif // for header file