64,648
社区成员
发帖
与我相关
我的任务
分享
namespace iiippp
{
class Point2
{
/**
Add to this Point2 the Vector2 'v'.
*/
void operator+= (const Vector2& v);
/**
Subtract from this Point2 the Vector2 'v'.
*/
void operator-= (const Vector2& v);
}
}
#include <Math2D/Matrix3x3.h>
using namespace ITCS4120;
void operator+= (const Vector2& v)
{
array[0]+=v.array[0];
array[1]+=v.array[1];
}
void operator -=(const Vector2& v)
{
v.array[0]=9;
}
void Point2::operator+= (const Vector2& v)
{
array[0]+=v.array[0];
array[1]+=v.array[1];
}
void Point2::operator -= (const Vector2& v)
{
array[0] -=v.array[0];
array[1] -=v.array[1];
}
void operator+= (const Vector2& v)
{
array[0]+=v.array[0];
array[1]+=v.array[1];
}
void Point2::operator -= (const Vector2& v)
{
array[0] -=v.array[0];
array[1] -=v.array[1];
}