// cVector3D.cpp: implementation of the cVector3D class.
//
//////////////////////////////////////////////////////////////////////

#include <math.h>
#include "cVector3D.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

template <class Type> cVector3D<Type>::cVector3D(){
	x = 0;
	y = 0;
	z = 0;
}

template <class Type> cVector3D<Type>::~cVector3D(){

}

template <class Type> cVector3D<Type>::operator Type(){
	return Type(sqrt(double(x * x + y * y + z * z)));
}

template <class Type> Type cVector3D<Type>::GetLength(){
	return Type(sqrt(double(x * x + y * y + z * z)));
}

template <class Type> double cVector3D<Type>::GetXYAngle(){
// 좌표축에 대한 각도를 반환
	double Angle;
	Angle = acos(double(x) / double(GetLength()));
	if(y >= 0) return Angle;
	return (3.1416 * 2) - Angle;


}
