diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-03 11:59:53 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-03-03 11:59:53 +0000 |
commit | f9980c8854a94863b24be459d800ba57fd92037f (patch) | |
tree | 8a245c5a9b6a863f5a449d4e1deb34a14e1d1db4 /src/utils/mathutils.h | |
parent | cdf81ef8e5b25fd8751a92c6ff394c01daedbb88 (diff) | |
download | manaserv-f9980c8854a94863b24be459d800ba57fd92037f.tar.gz manaserv-f9980c8854a94863b24be459d800ba57fd92037f.tar.bz2 manaserv-f9980c8854a94863b24be459d800ba57fd92037f.tar.xz manaserv-f9980c8854a94863b24be459d800ba57fd92037f.zip |
Use M_PI_2 instead of acos(0.0f) and FLT_MAX instead of 1.0E40f (which exceeded
the maximum float value). Some cosmetics (whitespace and declaring variables
where they are used).
Diffstat (limited to 'src/utils/mathutils.h')
-rw-r--r-- | src/utils/mathutils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils/mathutils.h b/src/utils/mathutils.h index 3d90b022..31f48805 100644 --- a/src/utils/mathutils.h +++ b/src/utils/mathutils.h @@ -27,8 +27,16 @@ namespace utils {
namespace math
{
+ /**
+ * A very fast function to calculate the approximate inverse square
+ * root of a floating point value.
+ */
float fastInvSqrt(float x);
+ /**
+ * A helper function that uses the fastInvSqrt for getting the
+ * normal squareroot.
+ */
float fastSqrt(float x);
float cachedSin(int angle);
|