//File:  Vector.cpp:

#include "vector.h"
	//construct
Vector::Vector(void){};
Vector::Vector(float myx, float myy, float myz)
{ 
	x= myx;
	y= myy;
	z= myz;
}
void Vector::Scale(float s)
{
	x= s*x;
	y= s*y;
	z= s*z;
}
void Vector::Add(Vector & v1, Vector & v2)
{
	v1.x= v2.x + v1.x;
	v1.y= v2.y + v1.y;
	v1.z= v2.z + v1.z;
}
Vector Vector::getVector(void)
{
   return Vector(x,y,z);
}
void Vector::Add(Vector & v1)
{
	x= x + v1.x;
	y= y + v1.y;
	z = z + v1.z;
}

//File: Vector.h:

//*****(note x,y,z are not private–should they be?)
#ifndef VECTOR_H
#define VECTOR_H

class Vector

{
public:

	//construct
	Vector(float x, float y, float z);
	Vector(void);
	void Scale(float s);
	void Add(Vector & v1);
	void Add(Vector & v1,Vector & v2);
	Vector getVector(void);
//private:    //these are  currently public – should they be private?
	float x;
	float y;
	float z;
};
#endif


