⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vector.cpp

📁 本程序主要是设计了一个人工势能场机器人运动规划算法。并提出了一个新的斥力场函数。
💻 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 + -