arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

mathExt.h File Reference

#include <iostream>
#include <limits>
#include "vec3.h"
#include "quat.h"
#include "mat3.h"

Go to the source code of this file.

Namespaces

namespace  gutz

usefull constants

these are often missing from math.h

#define M_E   2.71828182845904523536
 ////////////////////////////////////////////////////////////////////////

#define M_LOG2E   1.44269504088896340736
#define M_LOG10E   0.434294481903251827651
#define M_LN2   0.693147180559945309417
#define M_LN10   2.30258509299404568402
#define M_PI   3.14159265358979323846
#define M_PI_2   1.57079632679489661923
#define M_PI_4   0.785398163397448309616
#define M_1_PI   0.318309886183790671538
#define M_2_PI   0.636619772367581343076
#define M_2_SQRTPI   1.12837916709551257390
#define M_SQRT2   1.41421356237309504880
#define M_SQRT1_2   0.707106781186547524401

Defines

#define RAD2DEG(x)   (180.0/M_PI*(x))
 conversions

#define DEG2RAD(x)   (M_PI/180.0*(x))
#define SGN(x)   ((x)>0 ? 1.0 : ((x)<0 ? -1.0 : 0))
#define SQ(x)   ((x)*(x))
#define DRAND48   (rand()/(double)RAND_MAX)


Define Documentation

#define DEG2RAD x   )     (M_PI/180.0*(x))
 

Definition at line 156 of file mathExt.h.

#define DRAND48   (rand()/(double)RAND_MAX)
 

#define M_1_PI   0.318309886183790671538
 

Definition at line 85 of file mathExt.h.

#define M_2_PI   0.636619772367581343076
 

Definition at line 88 of file mathExt.h.

#define M_2_SQRTPI   1.12837916709551257390
 

Definition at line 91 of file mathExt.h.

#define M_E   2.71828182845904523536
 

////////////////////////////////////////////////////////////////////////

Definition at line 61 of file mathExt.h.

#define M_LN10   2.30258509299404568402
 

Definition at line 73 of file mathExt.h.

#define M_LN2   0.693147180559945309417
 

Definition at line 70 of file mathExt.h.

#define M_LOG10E   0.434294481903251827651
 

Definition at line 67 of file mathExt.h.

#define M_LOG2E   1.44269504088896340736
 

Definition at line 64 of file mathExt.h.

#define M_PI   3.14159265358979323846
 

Definition at line 76 of file mathExt.h.

#define M_PI_2   1.57079632679489661923
 

Definition at line 79 of file mathExt.h.

#define M_PI_4   0.785398163397448309616
 

Definition at line 82 of file mathExt.h.

#define M_SQRT1_2   0.707106781186547524401
 

Definition at line 97 of file mathExt.h.

#define M_SQRT2   1.41421356237309504880
 

Definition at line 94 of file mathExt.h.

#define RAD2DEG x   )     (180.0/M_PI*(x))
 

conversions

Definition at line 155 of file mathExt.h.

#define SGN x   )     ((x)>0 ? 1.0 : ((x)<0 ? -1.0 : 0))
 

Definition at line 157 of file mathExt.h.

#define SQ x   )     ((x)*(x))
 

Definition at line 158 of file mathExt.h.


Send questions, comments, and bug reports to:
jmk