#include "iVector4.hpp"

/*** Custom Header File ***/
#include "../Vector/Vector4.hpp"

using MathEngine::iVector4;
using MathEngine::Vector4;

iVector4::iVector4( const int X /*= 0*/, const int Y /*= 0*/, const int Z /*= 0*/, const int W /*= 0*/ )
	: iVector3(X, Y, Z), w(W)
{}

iVector4::iVector4( const iVector2& copy )
	: iVector3(copy.x, copy.y, 0), w(0)
{}

iVector4::iVector4( const iVector3& copy )
	: iVector3(copy), w(0)
{}

iVector4::iVector4( const SDL_Rect& copy )
{
	x = int(copy.x);
	y = int(copy.y);
	z = int(copy.w);
	w = int(copy.h);
}

iVector4& iVector4::operator=( const SDL_Rect& copy )
{
	x = int(copy.x);
	y = int(copy.y);
	z = int(copy.w);
	w = int(copy.h);

	return *this;
}

bool iVector4::operator==( const SDL_Rect& other ) const
{
	bool rtn = false;
	if ( x == other.x )
		if ( y == other.y )
			if ( z == other.w )
				if ( w == other.h )
					rtn = true;
	return rtn;
}

iVector4::iVector4( const Vector4& copy )
{
	x = int(copy.x);
	y = int(copy.y);
	z = int(copy.z);
	w = int(copy.w);
}

iVector4& iVector4::operator=( const Vector4& copy )
{
	x = int(copy.x);
	y = int(copy.y);
	z = int(copy.z);
	w = int(copy.w);

	return *this;
}

bool iVector4::operator==( const iVector4& other ) const
{
	bool rtn = false;
	if ( x == other.x )
		if ( y == other.y )
			if ( z == other.z )
				if ( w == other.w )
					rtn = true;
	return rtn;
}
