From bd13fa3f9396f1f681759f4623c55d5f91d74a9c Mon Sep 17 00:00:00 2001
From: LYW <leeyeanwoo@diteam.co.kr>
Date: 목, 29 7월 2021 11:42:19 +0900
Subject: [PATCH] Ongoing90 #3524 CF AOI Review 디포커스 알람 추가 및 FDC 보고 방식 개선

---
 ReviewHistory/include/akSTL/inl/akVectorT.inl |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 109 insertions(+), 0 deletions(-)

diff --git a/ReviewHistory/include/akSTL/inl/akVectorT.inl b/ReviewHistory/include/akSTL/inl/akVectorT.inl
new file mode 100644
index 0000000..da0f966
--- /dev/null
+++ b/ReviewHistory/include/akSTL/inl/akVectorT.inl
@@ -0,0 +1,109 @@
+
+//#include "../akvectorT.h"
+#define AKINLINE inline
+
+
+
+template<typename T> AKINLINE
+CakVectorT<T> CakVectorT<T>::operator-( CakVectorT<T> vector ) const throw()
+{
+	return CakVectorT(x - vector.x, y - vector.y, z - vector.z);
+}
+
+template<typename T> AKINLINE
+CakVectorT<T> CakVectorT<T>::operator+( CakVectorT<T> vector ) const throw()
+{
+	return CakVectorT(x + vector.x, y + vector.y, z + vector.z);
+}
+
+template<typename T> AKINLINE
+CakVectorT<T> CakVectorT<T>::operator-() const throw()
+{
+	return CakVectorT(-x,-y,-z);
+}
+
+template<typename T> AKINLINE
+void CakVectorT<T>::operator-=( CakVectorT<T> vector ) throw()
+{
+	x -= vector.x;
+	y -= vector.y;
+	z -= vector.z;
+}
+
+template<typename T> AKINLINE
+void CakVectorT<T>::operator+=( CakVectorT<T> vector ) throw()
+{
+	x += vector.x;
+	y += vector.y;
+	z += vector.z;
+}
+
+template<typename T> AKINLINE
+bool CakVectorT<T>::operator!=( CakVectorT<T> vector ) const throw()
+{
+	return (x != vector.x || y != vector.y || z != vector.z);
+}
+
+template<typename T> AKINLINE
+bool CakVectorT<T>::operator==( CakVectorT<T> vector ) const throw()
+{
+	return (x == vector.x && y == vector.y && z == vector.z);
+}
+
+template<typename T> AKINLINE
+void CakVectorT<T>::set( T X, T Y, T Z ) throw()
+{
+	x = X; 
+	y = Y;
+	z = Z;
+}
+
+template<typename T> AKINLINE
+void CakVectorT<T>::Offset( CakVectorT<T> vector ) throw()
+{
+	x += vector.x;
+	y += vector.y;
+	z += vector.z;
+}
+
+template<typename T> AKINLINE
+void CakVectorT<T>::Offset( T xOffset, T yOffset, T zOffset) throw()
+{
+	x += xOffset;
+	y += yOffset;
+	z += zOffset;
+}
+
+template<typename T> AKINLINE
+CakVectorT<T> CakVectorT<T>::operator*(T& a) const throw()
+{
+	return CakVectorT(x * a, y * a, z * a);
+}
+
+
+template<typename T> AKINLINE
+CakVectorT<T> CakVectorT<T>::operator*( CakVectorT<T> &vec ) const throw()
+{
+	CakVectorT<T> vc;
+	vc.x = y*vec.z - z*vec.y;
+	vc.y = z*vec.x - x*vec.z;
+	vc.z = x*vec.y - y*vec.x;
+	return vc;
+};
+
+template<typename T> AKINLINE
+void CakVectorT<T>::Normalize()
+{
+	double length;
+
+	//벡터의 길이를 계산한다.
+	length = sqrt((x*x) + (y*y) +(z*z));
+	// 길이가 0에 가까운 벡터에게 절절한 값을 항당하여 프로그램이 폭주하지 않도록 한다.
+	if(length == 0.0f) length = 1.0f;
+
+	// 각 성분을 벡터의 길이로 나누면 단위 벡터가 된다.
+	x = x / length;
+	y = y / length;
+	z = z / length;
+
+}
\ No newline at end of file

--
Gitblit v1.9.3