Subversion Repositories gelsvn

Rev

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

Rev 2 Rev 10
Line 6... Line 6...
6
namespace CGLA {
6
namespace CGLA {
7
 
7
 
8
	template<class T, class V, int N>
8
	template<class T, class V, int N>
9
	class ArithVecFloat: public ArithVec<T,V,N>
9
	class ArithVecFloat: public ArithVec<T,V,N>
10
	{
10
	{
-
 
11
#define for_all_i(expr) for(int i=0;i<N;i++) {expr;}
-
 
12
 
11
	public:
13
	public:
12
 
14
 
13
		ArithVecFloat() {}
15
		ArithVecFloat() 
-
 
16
			{
-
 
17
#ifndef NDEBUG
-
 
18
			for_all_i(data[i]=CGLA_INIT_VALUE);
-
 
19
#endif
-
 
20
			}
14
 
21
 
15
		ArithVecFloat(T a): 
22
		ArithVecFloat(T a): 
16
			ArithVec<T,V,N>(a) {}
23
			ArithVec<T,V,N>(a) {}
17
 
24
 
18
		ArithVecFloat(T a, T b): 
25
		ArithVecFloat(T a, T b): 
Line 50... Line 57...
50
	template<class T, class V, int N>
57
	template<class T, class V, int N>
51
	inline V normalize(const ArithVecFloat<T,V,N>& v) 
58
	inline V normalize(const ArithVecFloat<T,V,N>& v) 
52
	{
59
	{
53
		return v/v.length();
60
		return v/v.length();
54
	}
61
	}
55
 
-
 
-
 
62
#undef for_all_i
56
}
63
}
57
 
64
 
58
#endif
65
#endif
59
 
66