/*
....[@@@..[@@@..............[@.................. MUD++ is a written from
....[@..[@..[@..[@..[@..[@@@@@....[@......[@.... scratch multi-user swords and
....[@..[@..[@..[@..[@..[@..[@..[@@@@@..[@@@@@.. sorcery game written in C++.
....[@......[@..[@..[@..[@..[@....[@......[@.... This server is an ongoing
....[@......[@..[@@@@@..[@@@@@.................. development project.  All 
................................................ contributions are welcome. 
....Copyright(C).1995.Melvin.Smith.............. Enjoy. 
------------------------------------------------------------------------------
Melvin Smith (aka Fusion)         msmith@falcon.mercer.peachnet.edu 
MUD++ development mailing list    mudpp-list@spice.com
------------------------------------------------------------------------------
vector.cc
*/

#include "vector.h"

bool Vector::operator == ( const Vector & vec )
{
	if( x != vec.x )
		return false;
	else if( y != vec.y )
		return false;
	else if( z != vec.z )
		return false;
	
	return true;
}

void Vector::operator += ( const Vector & vec )
{
	x += vec.x;
	y += vec.y;
	z += vec.z;
}

void Vector::operator -= ( const Vector & vec )
{
	x -= vec.x;
	y -= vec.y;
	z -= vec.z;
}

Vector Vector::operator + ( const Vector & vec )
{
	Vector temp = *this;
	temp.x += vec.x;
	temp.y += vec.y;
	temp.z += vec.z;
	return temp;
}

Vector Vector::operator - ( const Vector & vec )
{
	Vector temp = *this;
	temp.x -= vec.x;
	temp.y -= vec.y;
	temp.z -= vec.z;
	return temp;
}