📄 vector.cpp
字号:
// Vector.cpp: implementation of the CVector class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Path.h"
#include "Vector.h"
#include "math.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CVector::~CVector()
{
}
CVector CVector::operator + (CVector &v)
{
CVector temp;
temp.x = x + v.x;
temp.y = y + v.y;
return temp;
}
void CVector::operator += (CVector &v)
{
x = x + v.x;
y = y + v.y;
}
void CVector::operator = (CVector &v)
{
x = v.x;
y = v.y;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -