Subversion Repositories gelsvn

Rev

Rev 10 | Rev 21 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 12
Line 1... Line 1...
1
#ifndef __CGLA_H
1
#ifndef __CGLA_CGLA_H__
2
#define __CGLA_H
2
#define __CGLA_CGLA_H__
3
 
3
 
4
#ifndef OLD_C_HEADERS
-
 
5
#include <cmath>
4
#include <cmath>
6
#include <climits>
5
#include <climits>
7
#include <cassert>
6
#include <cassert>
8
#else
-
 
9
#include <math.h>
-
 
10
#include <limits.h>
-
 
11
#include <assert.h>
-
 
12
#endif
-
 
13
 
-
 
14
#include <algorithm>
7
#include <algorithm>
15
 
8
 
16
#ifndef M_PI
9
#ifndef M_PI
17
#define M_PI 3.14159265358979323846
10
#define M_PI 3.14159265358979323846
18
#define M_PI_2 1.57079632679489661923
11
#define M_PI_2 1.57079632679489661923
19
#endif
12
#endif
20
 
13
 
21
#define CGLA_INIT_VALUE NAN
14
#define CGLA_INIT_VALUE NAN
22
 
15
 
23
namespace CGLA {
16
namespace CGLA 
-
 
17
{
24
 
18
  
25
	/** Numerical constant representing something large.
19
  /** Numerical constant representing something large.
26
			value is a bit arbitrary */
20
      value is a bit arbitrary */
27
	const double BIG=10e+30;
21
  const double BIG=10e+30;
28
 
22
 
Line 99... Line 93...
99
		for(int i=0;i<k;++i)
93
    for(int i=0;i<k;++i)
100
			y *= x;
94
      y *= x;
101
		return y;
95
    return y;
102
	}
96
  }
103
 
97
 
-
 
98
  template<class T, class S>
-
 
99
  void raw_assign(T& a,  const S* b)
-
 
100
  {
-
 
101
    memcpy(static_cast<void*>(a.get()),static_cast<const void*>(b),sizeof(T));
-
 
102
  }
104
	
103
	
105
}
104
}
106
 
105
 
107
#endif
106
#endif