Subversion Repositories gelsvn

Rev

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

Rev 2 Rev 12
Line 1... Line 1...
1
#ifndef __CGLA_UNITVECTOR_H_
1
#ifndef __CGLA_UNITVECTOR_H__
2
#define __CGLA_UNITVECTOR_H_
2
#define __CGLA_UNITVECTOR_H__
3
 
3
 
4
#include "CGLA.h"
4
#include "CGLA.h"
5
#include "Vec3f.h"
5
#include "Vec3f.h"
6
#include "TableTrigonometry.h"
6
#include "TableTrigonometry.h"
7
 
7
 
Line 18... Line 18...
18
	{
18
    {
19
		TT::Angle theta, phi;
19
      TT::Angle theta, phi;
20
 
20
 
21
		void encode(const Vec3f& v)
21
      void encode(const Vec3f& v)
22
		{
22
	{
23
#ifndef OLD_C_HEADERS
-
 
24
			theta = TT::t_atan(std::sqrt(CGLA::sqr(v[0])+CGLA::sqr(v[1])), v[2]);
23
	  theta = TT::t_atan(std::sqrt(CGLA::sqr(v[0])+CGLA::sqr(v[1])), v[2]);
25
#else
-
 
26
			theta = TT::t_atan(sqrt(CGLA::sqr(v[0])+CGLA::sqr(v[1])), v[2]);
-
 
27
#endif
-
 
28
			phi   = TT::t_atan(v[0],v[1]);
24
	  phi   = TT::t_atan(v[0],v[1]);
29
		}
25
	}
30
	
26
	
31
	public:
27
    public:
32
 
28