Subversion Repositories gelsvn

Rev

Rev 102 | Rev 178 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 102 Rev 129
Line 17... Line 17...
17
#define M_PI_2 1.57079632679489661923
17
#define M_PI_2 1.57079632679489661923
18
#endif
18
#endif
19
 
19
 
20
namespace CGLA 
20
namespace CGLA 
21
{
21
{
-
 
22
		inline float cgla_nan() 
-
 
23
		{
-
 
24
				static const float cgla_nan_value = log(1.0f);
-
 
25
				return cgla_nan_value;
-
 
26
		}
-
 
27
		
22
  /** Procedural definition of NAN */  
28
  /** Procedural definition of NAN */  
23
  const float CGLA_NAN = log(-1.0f);
29
#define CGLA_NAN cgla_nan()
24
 
30
 
25
  /** NAN is used for initialization of vectors and matrices
31
  /** NAN is used for initialization of vectors and matrices
26
      in debug mode */
32
      in debug mode */
27
  const float CGLA_INIT_VALUE = CGLA_NAN;
33
#define CGLA_INIT_VALUE cgla_nan()
28
 
34
 
29
  /** Numerical constant representing something large.
35
  /** Numerical constant representing something large.
30
      value is a bit arbitrary */
36
      value is a bit arbitrary */
31
  const double BIG=10e+30;
37
  const double BIG=10e+30;
32
 
38
 
Line 40... Line 46...
40
	
46
	
41
  /** Numerical constant represents something small.
47
  /** Numerical constant represents something small.
42
      value is a bit arbitrary */
48
      value is a bit arbitrary */
43
  const double SMALL=10e-2;
49
  const double SMALL=10e-2;
44
 
50
 
-
 
51
		inline double sqrt3()
-
 
52
		{
45
  const double SQRT3=sqrt(3.0);
53
				static const double sqrt3_val = sqrt(3.0);
-
 
54
				return sqrt3_val;
-
 
55
		}
-
 
56
 
-
 
57
#define SQRT3 sqrt3()
46
 
58
 
47
  /// Useful enum that represents coordiante axes.
59
  /// Useful enum that represents coordiante axes.
48
  enum Axis {XAXIS=0,YAXIS=1,ZAXIS=2};
60
  enum Axis {XAXIS=0,YAXIS=1,ZAXIS=2};
49
 
61
 
50
#ifdef WIN32
62
#ifdef WIN32