Subversion Repositories gelsvn

Rev

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

Rev 45 Rev 125
Line 8... Line 8...
8
namespace CGLA {
8
namespace CGLA {
9
 
9
 
10
		template<class T, class V>
10
		template<class T, class V>
11
		void ArithVec3Float<T,V>::get_spherical(T &theta, T &phi, T &rlen ) const
11
		void ArithVec3Float<T,V>::get_spherical(T &theta, T &phi, T &rlen ) const
12
		{  
12
		{  
13
				rlen = length();
13
				rlen = this->length();
14
				theta = acos((*this)[2]/rlen);    
14
				theta = acos((*this)[2]/rlen);    
15
				if ((*this)[0]>0)
15
				if ((*this)[0]>0)
16
						phi = atan((*this)[1]/(*this)[0]);
16
						phi = atan((*this)[1]/(*this)[0]);
17
				else 
17
				else 
18
						if ((*this)[0]<0)
18
						if ((*this)[0]<0)