#include "stdafx.h"
#include "FloatPoint.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CFloatPoint::CFloatPoint()
{
	x = 0;
	y = 0;
}

CFloatPoint::CFloatPoint(float fx, float fy)
{
	x = fx;
	y = fy;
}

CFloatPoint::~CFloatPoint()
{

}

void CFloatPoint::Offset(float xOffset, float yOffset)
{
	x += xOffset;
	y += yOffset;
}

BOOL CFloatPoint::operator ==(CFloatPoint fpoint) const
{
	BOOL bRet = FALSE;
	if ((x == fpoint.x) && (y == fpoint.y))
	{
		bRet = TRUE;
	}
	return bRet;
}

BOOL CFloatPoint::operator !=(CFloatPoint fpoint) const
{
	BOOL bRet = TRUE;
	if ((x == fpoint.x) && (y == fpoint.y))
	{
		bRet = FALSE;
	}
	return bRet;
}

void CFloatPoint::operator +=(CFloatPoint fpoint)
{
	x += fpoint.x;
	y += fpoint.y;
}

void CFloatPoint::operator -=(CFloatPoint fpoint)
{
	x -= fpoint.x;
	y -= fpoint.y;
}


CFloatPoint CFloatPoint::operator + (CFloatPoint fpoint) const
{
	CFloatPoint fpointRet;
	fpointRet.x = x + fpoint.x;
	fpointRet.y = y + fpoint.y;
	return fpointRet;
}

CFloatPoint CFloatPoint::operator - (CFloatPoint fpoint) const
{
	CFloatPoint fpointRet;
	fpointRet.x = x - fpoint.x;
	fpointRet.y = y - fpoint.y;
	return fpointRet;
}

