# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

cyclone::Vector3 p(1, 4, -5); //Point p(1,4,-5)

cyclone::Vector3 v(5, 1, 4); //vector v(5,1,4)

cyclone::Vector3 v1(1, 0, 0); //vector v1(1,0,0)

cyclone::Vector3 v2(0, 1, 0); //vector v2(0,1,0)

cyclone::Vector3 startp(8, 2, 5); //시작점 (8,2,5)

cyclone::Vector3 endp(1, -1, 4); //끝점 (1,-1,4)

cyclone::Vector3 vn(1, 3, 4); //vector v(1,3,4)

//1.Point p(1,4,-5)를 vector v(5,1,4) 만큼 이동하라

p += v;

std::cout << "1: " << p.toString() << std::endl;

//2.vector v1(1,0,0) 와 vector v2(0,1,0)들 더하라

cyclone::Vector3 v3 = v1 + v2;

std::cout << "2: " << v3.toString() << std::endl;

//3.Vector v1(0,1,0) 에 scalar 5를 곱하라

cyclone::Vector3 S5 = v2 * 5;

std::cout << "3: " << S5.toString() << std::endl;

//4.시작점 (8,2,5) 과 끝점 (1,-1,4)를 잇는 벡터를 구하시오

cyclone::Vector3 SE = endp - startp;

std::cout << "4: " << SE.toString() << std::endl;

//5.vector v(1,3,4)를 정규화(normalize)하시오

vn.normalise();

std::cout << "5: " << vn.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX
#include <iostream>
#include "core.h"

int main()
{
	//이동 하는 것이니 p에 v를 더함
	cyclone::Vector3 p(1, 4, -5);
	cyclone::Vector3 v(5, 1, 4);
	p += v;
	std::cout << p.toString() << '\n';

	//두 백터를 더한 값을 출력
	cyclone::Vector3 v1(1, 0, 0);
	cyclone::Vector3 v2(0, 1, 0);
	std::cout << (v1 + v2).toString()<< '\n';

	//v1에 scalar 5를 곱함
	v1 = cyclone::Vector3(0, 1, 0);
	v1 *= 5;
	std::cout << v1.toString() << '\n';

	//두 점을 잇는 벡터를 구하기
	cyclone::Vector3 first(8, 2, 5);
	cyclone::Vector3 second(1, -1, 4);
	cyclone::Vector3 v4 = second - first;
	std::cout << v4.toString() << '\n';


	//normalise
	v = cyclone::Vector3(1,3,4);
	v.normalise();
	std::cout << v.toString() << '\n';





    return 0;


}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

// 1

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

cyclone::Vector3 r1 = p + v;

std::cout << r1.toString() << std::endl;

// 2

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 r2 = v1 + v2;

std::cout << r2.toString() << std::endl;

// 3

cyclone::Vector3 v3(0, 1, 0);

cyclone::Vector3 r3 = v3 * 5;

std::cout << r3.toString() << std::endl;

// 4

cyclone::Vector3 start(8, 2, 5);

cyclone::Vector3 end(1, -1, 4);

cyclone::Vector3 r4 = end - start;

std::cout << r4.toString() << std::endl;

// 5

cyclone::Vector3 v4(1, 3, 4);

v4.normalise();

std::cout << v4.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX
#include <iostream>
#include "core.h"

int main()
{
	//1
	cyclone::Vector3 p(1, 4, -5);
	cyclone::Vector3 v(5, 1, 4);
	cyclone::Vector3 pv = p + v;
	std::cout << "pv = " << pv.toString() << std::endl;

	//2
	cyclone::Vector3 v1(1, 0, 0);
	cyclone::Vector3 v2(0, 1, 0);
	cyclone::Vector3 v3 = v1 + v2;
	std::cout << "v3 = " << v3.toString() << std::endl;

	//3
	cyclone::Vector3 v4(0, 1, 0);
	cyclone::Vector3 v5 = v4 * 5;
	std::cout << "v5 = " << v5.toString() << std::endl;

	//4
	cyclone::Vector3 v6(8, 2, 5);
	cyclone::Vector3 v7(1, -1, 4);
	cyclone::Vector3 v8 = v7 - v6;
	std::cout << "v8 = " << v8.toString() << std::endl;

	//5
	cyclone::Vector3 v9(1, 3, 4);
	v9.normalise();
	std::cout << "v9 = " << v9.toString() << std::endl;

	return 0;

}

# data[].attributes.body
#include <iostream>
#include <core.h>
using namespace std;


int one()
{
	cyclone::Vector3 P(1, 4, -5);
	cyclone::Vector3 V(5, 1, 4);

	cyclone::Vector3 result;
	result = P + V;
	cout << result.toString() << endl;
	return 0;
}

int two()
{
	cyclone::Vector3 V1(1, 0, 0);
	cyclone::Vector3 V2(0, 1, 0);

	cyclone::Vector3 result;
	result = V1 + V2;
	cout << result.toString() << endl;
	return 0;
}

int three()
{
	cyclone::Vector3 v1(0, 1, 0);

	cyclone::Vector3 result;
	result = v1 * 5;
	cout << result.toString() << endl;
	return 0;
}

int four()
{
	cyclone::Vector3 s(8, 2, 5);
	cyclone::Vector3 f(1, -1, 4);

	cyclone::Vector3 result;
	result = f - s;
	cout << result.toString() << endl;
	return 0;
}

int five()
{
	cyclone::Vector3 v(1, 3, 4);

	v.normalise();

	cout << v.toString() << endl;
	return 0;
}

int main()
{
	one();
	two();
	three();
	four();
	five();
}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

//1

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

p += v;

std::cout << "1: " << p.toString() << std::endl;

//2

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v3 = v1 + v2;

std::cout << "2: " << v3.toString() << std::endl;

//3

v1 = cyclone::Vector3(0, 1, 0);

v1 *= 5;

std::cout << "3: " << v1.toString() << std::endl;

//4

cyclone::Vector3 Start(8, 2, 5);

cyclone::Vector3 End(1, -1, 4);

v = End - Start;

std::cout << "4: " << v.toString() << std::endl;

//5

v = cyclone::Vector3(1, 3, 4);

v.normalise();

std::cout << "5: " << v.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

using namespace std;

int main()

{

//1번

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

p += v;

cout << p.toString() << endl;

//2번

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v3 = v1 + v2;

cout << v3.toString() << endl;

//3번

cyclone::Vector3 v4(0, 1, 0);

v4 *= 5;

cout << v4.toString() << endl;

//4번

cyclone::Vector3 start(8, 2, 5);

cyclone::Vector3 end(1, -1, 4);

cyclone::Vector3 v5 = end - start;

cout << v5.toString() << endl;

//5번

cyclone::Vector3 v6(1, 3, 4);

v6.normalise();

cout << v6.toString() << endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

cyclone::Vector3 P(1, 4, -5);

cyclone::Vector3 V(5, 1, 4);

P += V; // 1번

std::cout << P.toString() << std::endl;

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 c = v1 + v2; // 2번

std::cout << c.toString() << std::endl;

cyclone::Vector3 v3(0, 1, 0);

v3 *= 5.0f; // 3번

std::cout << v3.toString() << std::endl;

cyclone::Vector3 a(8, 2, 5);

cyclone::Vector3 b(1, -1, 4);

P = b - a;// 4번

std::cout << P.toString() << std::endl;

cyclone::Vector3 v(1, 3, 4);

v.normalise();

std::cout << v.toString() << std::endl;

return 0;

}

# data[].attributes.body
// 학번: 5702813
// 이름: 박채린
// 과목: 게임물리
// 과제: Lab0
// 2026년 1학기

#define NOMINMAX
#include <iostream>
#include "core.h"

int main()
{
	// 1. Point p(1,4,-5)를 vector v(5,1,4) 만큼 이동하라
	cyclone::Vector3 p(1, 4, -5);
	cyclone::Vector3 v(5, 1, 4);
	p += v;

	std::cout << p.toString() << std::endl;


	// 2. vector v1(1,0,0) 와 vector v2(0,1,0)를 더하라

	cyclone::Vector3 v1(1, 0, 0);
	cyclone::Vector3 v2(0, 1, 0);

	cyclone::Vector3 add_v = v1 + v2;

	std::cout << add_v.toString() << std::endl;


	// 3. Vector v1(0,1,0) 에 scalar 5를 곱하라
	cyclone::Vector3 scalar_v2 = v2 * 5;

	std::cout << scalar_v2.toString() << std::endl;


	// 4. 시작점 (8,2,5)과 끝점 (1,-1,4)를 잇는 벡터를 구하시오
	cyclone::Vector3 start(8, 2, 5);
	cyclone::Vector3 end(1, -1, 4);
	cyclone::Vector3 u = end - start;

	std::cout << u.toString() << std::endl;


	// 5. vector v(1,3,4)를 정규화(normalize)하시오
	cyclone::Vector3 normalized_v(1, 3, 4);
	normalized_v.normalise();
	std::cout << normalized_v.toString() << std::endl;

	return 0;
}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

//1.1. Point p(1,4,-5)를 vector v(5,1,4) 만큼 이동하라

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

p += v;

std::cout << p.toString() << std::endl;

//2. vector v1(1,0,0) 와 vector v2(0,1,0)들 더하라

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

v1 += v2;

std::cout << v1.toString() << std::endl;

//3. Vector v1(0,1,0) 에 scalar 5를 곱하라

v2 *= 5.0f;

std::cout << v2.toString() << std::endl;

//4. 시작점 (8,2,5) 과 끝점 (1,-1,4)를 잇는 벡터를 구하시오

cyclone::Vector3 s(8, 2, 5);

cyclone::Vector3 f(1, -1, 4);

cyclone::Vector3 v3 = f - s;

std::cout << v3.toString() << std::endl;

//5. vector v(1,3,4)를 정규화(normalize)하시오

cyclone::Vector3 v4(1, 3, 4);

v4.normalise();

std::cout << v4.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

void printAnswerWithPrefix(int problem_index, cyclone::Vector3 answer) {

std::cout << "\n문제 " << problem_index << ": " << answer.toString();

}

// program entry point

int main(void)

{

std::cout << "5820658_전형진";

// problem 1

cyclone::Vector3 p(1,4,-5), v(5,1,4);

printAnswerWithPrefix(1, cyclone::Vector3(p+v));

// problem 2

cyclone::Vector3 v1(1,0,0), v2(0,1,0);

printAnswerWithPrefix(2, cyclone::Vector3(v1+v2));

// problem 3

v1 = cyclone::Vector3(0,1,0);

printAnswerWithPrefix( 3, cyclone::Vector3(v1*(5.0f)) );

// problem 4

cyclone::Vector3 p_start(8,2,5), p_end(1,-1,4);

printAnswerWithPrefix(4, cyclone::Vector3(p_end -p_start));

// problem 5

v = cyclone::Vector3(1,3,4);

v.normalise();

printAnswerWithPrefix(5, v);

// program end point

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

//1

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

p += v;

std::cout << "1. " << p.toString() << std::endl;

//2

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

std::cout << "2. " << (v1 + v2).toString() << std::endl;

//3

v1 = cyclone::Vector3(0, 1, 0);

v1 *= 5;

std::cout << "3. " << v1.toString() << std::endl;

//4

cyclone::Vector3 p1(8, 2, 5);

cyclone::Vector3 p2(1, -1, 4);

v = p2 - p1;

std::cout << "4. " << v.toString() << std::endl;

//5

v = cyclone::Vector3(1, 3, 4);

v.normalise();

std::cout << "5. " << v.toString() << std::endl;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

// 3차원 벡터 설정

cyclone::Vector3 V(5, 1, 4);

cyclone::Vector3 V1(1, 0, 0);

cyclone::Vector3 V2(0, 1, 0);

cyclone::Vector3 V3(1, 3, 4);

cyclone::Vector3 startPoint(8, 2, 5);

cyclone::Vector3 endPoint(1, -1, 4);

// 3차원 포인트 설정

cyclone::Vector3 P(1, 4, -5);

// 1. P와 V의 합

cyclone::Vector3 C = P + V;

// 2. V1과 V2의 합

cyclone::Vector3 D = V1 + V2;

// 3. V1에 scalar 5를 곱했을때

cyclone::Vector3 E = V2 * 5;

// 4. 시작점과 끝점을 잇는 벡터

cyclone::Vector3 F = endPoint - startPoint;

// 5. V3를 정규화한 벡터

V3.normalise();

float l = V3.magnitude();

std::cout << "P + V = " << C.toString() << std::endl;

std::cout << "V1 + V2 = " << D.toString() << std::endl;

std::cout << "V1 * 5 = " << E.toString() << std::endl;

std::cout << "endPoint - startPoint = " << F.toString() << std::endl;

std::cout << "V3 normalised = " << V3.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX
#include <iostream>
#include "../Cyclone/core.h"

int main()
{
   cyclone::Vector3 p(1, 4, -5);
   cyclone::Vector3 v(5, 1, 4);
   cyclone::Vector3 v1(1, 0, 0);
   cyclone::Vector3 v2(0, 1, 0);
   cyclone::Vector3 v3(1, 0, 0);
   cyclone::Vector3 p1(8, 2, 5);
   cyclone::Vector3 p2(1, -1, 4);
   cyclone::Vector3 v4(1, 3, 4);

   p += v;
   cyclone::Vector3 A = p; // 1. Point p(1,4,-5)를 vector v(5,1,4) 만큼 이동하라
   cyclone::Vector3 B = v1 + v2; // 2. vector v1(1,0,0) 와 vector v2(0,1,0)들 더하라
   cyclone::Vector3 C = v3 * 5.0f; // 3. Vector v1(0,1,0) 에 scalar 5를 곱하라
   cyclone::Vector3 D = p2 - p1; // 4. 시작점 (8,2,5) 과 끝점 (1,-1,4)를 잇는 벡터를 구하시오
   cyclone::Vector3 E = v4;
   E.normalise(); // 5. vector v(1,3,4)를 정규화(normalize)하시오


   std::cout << A.toString() << std::endl;
   std::cout << B.toString() << std::endl;
   std::cout << C.toString() << std::endl;
   std::cout << D.toString() << std::endl;
   std::cout << E.toString() << std::endl;

   return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include <core.h>

int main()

{

//////

//1번

//////

cyclone::Vector3 P1(1, 4, -5);

cyclone::Vector3 v1(5, 1, 4);

cyclone::Vector3 result1 = P1 + v1;

std::cout << "Answer1 is" << result1.toString() << std::endl;

//////

//2번

//////

cyclone::Vector3 v2(1, 0, 0);

cyclone::Vector3 v3(0, 1, 0);

cyclone::Vector3 result2 = v2 + v3;

std::cout << "Answer2 is" << result2.toString() << std::endl;

//////

//3번

//////

cyclone::Vector3 v4(0, 1, 0);

cyclone::Vector3 result3 = v4 * 5.0f;

std::cout << "Answer3 is" << result3.toString() << std::endl;

//////

//4번

//////

cyclone::Vector3 v5(8, 2, 5);

cyclone::Vector3 v6(1, -1, 4);

cyclone::Vector3 result4 = v6 - v5;

std::cout << "Answer4 is" << result4.toString() << std::endl;

//////

//5번

//////

cyclone::Vector3 v7(1, 3, 4);

v7.normalise();

cyclone::Vector3 result5 = v7;

std::cout << "Answer5 is" << result5.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

#include "cyclone.h"

int main()

{

//문제 1

cyclone::Vector3 P(1, 4, -5);

cyclone::Vector3 V(5, 1, 4);

P += V;

std::cout << "P" << P.toString() << std::endl;

//문제 2

cyclone::Vector3 V1(1, 0, 0);

cyclone::Vector3 V2(0, 1, 0);

V1 += V2;

std::cout << "V1" << V1.toString() << std::endl;

//문제 3

cyclone::Vector3 v1(0, 1, 0);

v1 *= 5;

std::cout << "v1" << v1.toString() << std::endl;

//문제 4

cyclone::Vector3 start(8, 2, 5);

cyclone::Vector3 end(1, -1, 4);

end -= start;

std::cout << "end" << end.toString() << std::endl;

//문제 5

cyclone::Vector3 v(1, 3, 4);

v.normalise();

std::cout << "v" << v.toString() << std::endl;

}

# data[].attributes.body
#define NOMINMAX
#include <iostream>
#include "core.h"

int main()
{
   //1. Point p(1, 4, -5)를 vector v(5, 1, 4) 만큼 이동하라
   cyclone::Vector3 p(1, 4, -5);
   cyclone::Vector3 v(5, 1, 4);
   p += v;
   std::cout << p.toString() << std::endl;

   //2. vector v1(1, 0, 0) 와 vector v2(0, 1, 0)들 더하라
   cyclone::Vector3 v1(1, 0, 0);
   cyclone::Vector3 v2(0, 1, 0);
   cyclone::Vector3 v3 = v1 + v2;
   std::cout << v3.toString() << std::endl;

   //3. Vector v1(0, 1, 0) 에 scalar 5를 곱하라
   v1 = cyclone::Vector3(0, 1, 0);
   v1 *= 5;
   std::cout << v1.toString() << std::endl;

   //4. 시작점(8, 2, 5) 과 끝점(1, -1, 4)를 잇는 벡터를 구하시오
   cyclone::Vector3 start(8, 2, 5);
   cyclone::Vector3 last(1, -1, 4);
   v = last - start;
   std::cout << v.toString() << std::endl;

   //5. vector v(1, 3, 4)를 정규화(normalize)하시오
   v = cyclone::Vector3(1, 3, 4);
   v.normalise();
   std::cout << v.toString() << std::endl;

   return 0;
}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

//1. pointp(1,4,-5)를 vector v(5,1,4)만큼 이동하라

cyclone::Vector3 P(1, 4, -5);

cyclone::Vector3 A(5, 1, 4);

P += A;

std::cout << P.toString() << std::endl;

//2. vector v1(1,0,0)과 vector v2(0,1,0)을 더하라

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v3 = v1 + v2;

std::cout << "v1 + v2 = " << v3.toString() << std::endl;

//3. Vector v1(0,1,0)에 scalar5를 곱하라

v2 *= 5;

std::cout << v2.toString() << std::endl;

//4. 시작점 (8,2,5)와 끝점 (1,-1,4)를 잇는 벡터를 구하시오

cyclone::Vector3 startp(8, 2, 5);

cyclone::Vector3 endp(1, -1, 4);

cyclone::Vector3 se;

se = endp - startp;

std::cout << se.toString() << std::endl;

//5, vector v(1,3,4)를 정규화(normalize)하시오

cyclone::Vector3 v4(1, 3, 4);

v4.normalise();

std::cout << v4.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX
#include <iostream>
#include "core.h"
using namespace cyclone;

int main()
{
  // 1. Point p(1,4,-5)를 vector v(5,1,4) 만큼 이동하라
  cyclone::Vector3 p(1, 4, -5);
  cyclone::Vector3 v = cyclone::Vector3(5, 1, 4);
  cyclone::Vector3 sol1 = v + p;
  std::cout << sol1.toString() << std::endl;

  // 2. vector v1(1,0,0) 와 vector v2(0,1,0)들 더하라
  cyclone::Vector3 v1(1, 0, 0);
  cyclone::Vector3 v2(0, 1, 0);

  cyclone::Vector3 sol2 = v1 + v2;
  std::cout << sol2.toString() << std::endl;

  // 3. Vector v1(0,1,0) 에 scalar 5를 곱하라
  cyclone::Vector3 v3(0, 1, 0);
  cyclone::Vector3 sol3 = v3 * 5.0f;

  std::cout << sol3.toString() << std::endl;

  // 4. 시작점 (8,2,5) 과 끝점 (1,-1,4)를 잇는 벡터를 구하시오
  cyclone::Vector3 v4(8, 2, 3);
  cyclone::Vector3 v5(1, -1, 4);
  cyclone::Vector3 sol4 = v4 - v5;

  std::cout << sol4.toString() << std::endl;

  // 5. vector v(1,3,4)를 정규화(normalize)하시오

  cyclone::Vector3 v6(1, 3, 4);
  cyclone::Vector3 sol5 = v6;
  sol5.normalise();
  std::cout << sol5.toString() << std::endl;

  return 0;

  cyclone::Matrix4  m;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h" // Cyclone 파일 내부 참조

using namespace std;

/*namespace cyclone 을 사용하는 것은 비추

Vector가 어디의 벡터인지 시각적으로 알 수 없게 됨.

*/

int main()

{

//1번

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

p += v;

cout << "Point p = " << p.toString() << endl;

//2번

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

v1 += v2;

cout << "v1 + v2 = " << v1.toString() << endl;

//3번

cyclone::Vector3 V1(0, 1, 0);

V1 *= 5.0f;

cout << "v1 * 5 = " << V1.toString() << endl;

//4번

cyclone::Vector3 startP(8, 2, 5);

cyclone::Vector3 endP(1, -1, 4);

cyclone::Vector3 n = endP - startP;

cout << "result =" << n.toString() << endl;

//5번

cyclone::Vector3 V(1,3,4);

V.normalise();

cout << "v = " << V.toString() << endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

// 1번

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

p += v;

std::cout << p.toString() << std::endl;

// 2번

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v3 = v1 + v2;

std::cout << v3.toString() << std::endl;

// 3번

cyclone::Vector3 v4(0, 1, 0);

v4 *= 5.0f;

std::cout << v4.toString() << std::endl;

// 4번

cyclone::Vector3 p1(8, 2, 5);

cyclone::Vector3 p2(1, -1, 4);

cyclone::Vector3 v5 = p2 - p1;

std::cout << v5.toString() << std::endl;

// 5번

cyclone::Vector3 v6(1, 3, 4);

v6.normalise();

std::cout << v6.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

//1

cyclone::Vector3 P(1, 4, -5);

cyclone::Vector3 V(5, 1, 4);

cyclone::Vector3 X = P + V;

std::cout << X.toString() << std::endl;

//2

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v3 = v1 + v2;

std::cout << v3.toString() << std::endl;

//3

cyclone::Vector3 V1(0, 1, 0);

cyclone::Vector3 V2 = V1 * 5.0f;

std::cout << V2.toString() << std::endl;

//4

cyclone::Vector3 A(8, 2, 5);

cyclone::Vector3 B(1, -1, 4);

cyclone::Vector3 C = B - A;

std::cout << C.toString() << std::endl;

//5

cyclone::Vector3 V5(1, 3, 4);

V5.normalise();

std::cout << V5.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

// 1번 문제

cyclone::Vector3 P(1, 4, -5);

cyclone::Vector3 V(5, 1, 4);

P += V;

std::cout << 1. << P.toString() << std::endl;

// 2번 문제

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

v1 += v2;

std::cout << 2. << v1.toString() << std::endl;

// 3번 문제

cyclone::Vector3 V1(1, 2, 3);

V1 *= 5;

std::cout << 3. << V1.toString() << std::endl;

// 4번 문제

cyclone::Vector3 S(8, 2, 5);

cyclone::Vector3 F(1, -1, 4);

F -= S;

std::cout << 4. << F.toString() << std::endl;

// 5번 문제

cyclone::Vector3 V5(1, 3, 4);

V5.normalise();

float L = V5.magnitude();

std::cout << 5. << V5.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

// using namespace cyclone; <- 비추.

using namespace std;

int main()

{

//q1

cyclone::Vector3 P1(1, 4, -5);

cyclone::Vector3 v1(5, 1, 4);

cyclone::Vector3 q1P1 = P1 + v1;

cout << "Q1 = " << q1P1.toString() << endl;

//q2

cyclone::Vector3 q2v1(1, 0, 0);

cyclone::Vector3 q2v2(0, 1, 0);

cyclone::Vector3 v3 = q2v1 + q2v2;

cout << "Q2 = " << v3.toString() << endl;

//q3

cyclone::Vector3 q3v1(0, 1, 0);

cyclone::Vector3 q3 = q3v1 * 5.0f;

cout << "Q3 = " << q3.toString() << endl;

//q4

cyclone::Vector3 s1(8, 2, 5);

cyclone::Vector3 e1(1, -1, 4);

cyclone::Vector3 q4v1 = e1 - s1;

cout << "Q4 = " << q4v1.toString() << endl;

//q5

cyclone::Vector3 q5v1(1, 3, 4);

q5v1.normalise();

cout << "Q5 = " << q5v1.toString() << endl;

//cyclone::Vector B = M.transform(A); // B = M * A

//cyclone::Vector3 a(1, 1, 1);

//cyclone::Vector3 A(1, 3, 4);

//cyclone::Matrix4 m {1,2,2, 3,4,5, 2,5,2};

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

cyclone::Vector3 P(1, 4, -5);

cyclone::Vector3 V(5, 1, 4);

cyclone::Vector3 PV = P + V;

std::cout << "1. " << PV.toString() << std::endl;

cyclone::Vector3 V1(1, 0, 0);

cyclone::Vector3 V2(0, 1, 0);

cyclone::Vector3 V3 = V1 + V2;

std::cout << "2. " << V3.toString() << std::endl;

std::cout << "3. " << (V2 * 5).toString() << std::endl;

cyclone::Vector3 P1(8, 2, 5);

cyclone::Vector3 P2(1, -1, 4);

cyclone::Vector3 P3 = P2 - P1;

std::cout << "4. " << P3.toString() << std::endl;

cyclone::Vector3 V4(1, 3, 4);

V4.normalise();

std::cout << "5. " << V4.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

using namespace std;

int main()

{

cyclone::Vector3 P = cyclone::Vector3(1, 4, -5);

cyclone::Vector3 V = cyclone::Vector3(5, 1, 4);

P += V;

cout << "P + V: " << P.toString() << endl;

cyclone::Vector3 V1 = cyclone::Vector3(1, 0, 0);

cyclone::Vector3 V2 = cyclone::Vector3(0, 1, 0);

cout << "V1 + V2: " << (V1 + V2).toString() << endl;

V1 = cyclone::Vector3(0, 1, 0);

cout << "V1 Scalar(5): " << (V1 5).toString() << endl;

cyclone::Vector3 P1 = cyclone::Vector3(8, 2, 5);

cyclone::Vector3 P2 = cyclone::Vector3(1, -1, 4);

cout << "(P1 -> P2) Vector: " << (P2 - P1).toString() << endl;

V = cyclone::Vector3(1, 3, 4);

V.normalise();

cout << "V.normalise(): " << V.toString() << endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

// using namespace cyclone; // 사용하는 건 비추천.

int main()

{

// 1번 문제

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

p += v;

std::cout << "p+v = " << p.toString() << std::endl;

// 2번 문제

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v3 = v1 + v2;

std::cout << "v3 = " << v3.toString() << std::endl;

//3번 문제

cyclone::Vector3 V1(0, 1, 0);

V1 *= 5.0f;

std::cout << "V1*5 = " << V1.toString() << std::endl;

//4번 문제

cyclone::Vector3 start(8, 2, 5);

cyclone::Vector3 end(1, -1, 4);

cyclone::Vector3 result = end - start;

std::cout << "result = " << result.toString() << std::endl;

//5번 문제

cyclone::Vector3 V(1, 3, 4);

V.normalise();

std::cout << "v = " << V.toString() << std::endl;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

//1.

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

cyclone::Vector3 pv = p + v;

std::cout << "Vector p+v = " << pv.toString() << std::endl;

//2.

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v1v2 = v1 + v2;

std::cout << "Vector v1+v2 = " << v1v2.toString() << std::endl;

//3.

cyclone::Vector3 v_1(0, 1, 0);

v_1 *= 5;

std::cout << "Vector v_1 = " << v_1.toString() << std::endl;

//4.

cyclone::Vector3 s(8, 2, 5);

cyclone::Vector3 e(1, -1, 4);

cyclone::Vector3 Vse = e - s;

std::cout << "Vector Vse = " << Vse.toString() << std::endl;

//5.

cyclone::Vector3 V(1, 3, 4);

V.normalise();

std::cout << "Vector V = " << V.toString() << std::endl;

//cyclone::Vector3 a(1, 1, 1);

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

// 1. Point p(1,4,-5)를 vector v(5,1,4) 만큼 이동하라

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

p = p + v;

std::cout << "p: " << "(" << p.x << ", " << p.y << ", " << p.z << ")" << std::endl;

// 2. Point p(1,4,-5)를 vector v(5,1,4) 만큼 이동하라

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v3 = v1 + v2;

std::cout << "v1 + v2: " << "(" << v3.x << ", " << v3.y << ", " << v3.z << ")" << std::endl;

// 3. Vector v1(0,1,0) 에 scalar 5를 곱하라

v1 = cyclone::Vector3(0, 1, 0);

v1 *= 5.0f;

std::cout << "v1 * 5: " << "(" << v1.x << ", " << v1.y << ", " << v1.z << ")" << std::endl;

// 4. 시작점 (8,2,5) 과 끝점 (1,-1,4)를 잇는 벡터를 구하시오

cyclone::Vector3 p1(8, 2, 5);

cyclone::Vector3 p2(1, -1, 4);

v = p2 - p1;

std::cout << "p2 - p1: " << "(" << v.x << ", " << v.y << ", " << v.z << ")" << std::endl;

// 5. vector v(1,3,4)를 정규화(normalize)하시오

v = cyclone::Vector3(1, 3, 4);

v.normalise();

std::cout << "normalized v: " << "(" << v.x << ", " << v.y << ", " << v.z << ")" << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

//1. Point p(1,4,-5)를 vector v(5,1,4) 만큼 이동하라

cyclone::Vector3 p(1, 4, -5);

cyclone::Vector3 v(5, 1, 4);

cyclone::Vector3 d = p + v;

std::cout << d.toString() << std::endl;

//2. vector v1(1, 0, 0) 와 vector v2(0, 1, 0)들 더하라

cyclone::Vector3 v1(1, 0, 0);

cyclone::Vector3 v2(0, 1, 0);

cyclone::Vector3 v3 = v1 + v2;

std::cout << v3.toString() << std::endl;

//3. Vector v1(0, 1, 0) 에 scalar 5를 곱하라

cyclone::Vector3 v4(0, 1, 0);

v4 *= 5.0f;

std::cout << v4.toString() << std::endl;

//4. 시작점(8, 2, 5) 과 끝점(1, -1, 4)를 잇는 벡터를 구하시오

cyclone::Vector3 a(8, 2, 5);

cyclone::Vector3 b(1, -1, 4);

b -= a;

std::cout << b.toString() << std::endl;

//5. vector v(1, 3, 4)를 정규화(normalize)하시오

cyclone::Vector3 v5(1, 3, 4);

v5.normalise();

std::cout << v5.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX

#include <iostream>

#include "core.h"

int main()

{

//1

cyclone::Vector3 P(1, 4, -5);

cyclone::Vector3 V(5, 1, 4);

P += V;

std::cout << "P1: " << P.toString() << std::endl;

//2

cyclone::Vector3 V2_1(1, 0, 0);

cyclone::Vector3 V2_2(0, 1, 0);

std::cout << "V1 + V2 = " << (V2_1 + V2_2).toString() << std::endl;

//3

cyclone::Vector3 V3_1(0, 1, 0);

std::cout << "V1 scalar 5 = " << (V3_1 5).toString() << std::endl;

//4

cyclone::Vector3 start(8, 2, 5);

cyclone::Vector3 end(1, -1, 4);

cyclone::Vector3 s_to_e = end - start;

std::cout << "start to end = " << s_to_e.toString() << std::endl;

//5

cyclone::Vector3 V_5(1, 3, 4);

V_5.normalise();

std::cout << "V normalize = " << V_5.toString() << std::endl;

return 0;

}

# data[].attributes.body
#define NOMINMAX
#include <iostream>
#include "..\Cyclone\core.h"

int main()
{
   cyclone::Vector3 p(1,4,-5);
   cyclone::Vector3 v(5,1,4);
   p+=v;
   std::cout<<"1: " << p.toString() << std::endl;
   cyclone::Vector3 v1(1,0,0);
   cyclone::Vector3 v2(0,1,0);
   cyclone::Vector3 v3 = v1+v2;

   std::cout<<"2: " << v3.toString() << std::endl;
   v2 *= 5;


   std::cout<<"3: " << v2.toString() << std::endl;
   cyclone::Vector3 end_p(1,-1,4);
   cyclone::Vector3 start_p(8,2,5);
   cyclone::Vector3 v4 = end_p - start_p;

   std::cout<<"4: " << v4.toString() << std::endl;
   cyclone::Vector3 v5(1,3,4);
   v5.normalise();

   std::cout<<"5: " << v5.toString() << std::endl;
   return 0;


}