
#include <iostream>
#include "m_Vector.h"


void Vector::Cross (const Vector & px, const Vector & py)
{
     x = px.y*py.z - px.z*py.y;
     y = px.z*py.x - px.x*py.z;
     z = px.x*py.y - px.y*py.x;
}


void Vector::Normalize ()
{
	float n = 1.0/(this->Norm());
	x *= n;
	y *= n;
	z *= n;
}

inline bool Vector::IsZero (float precision = SMALL_EPSILON) const
{ 
	return (ABS(x) < precision) && (ABS(y) < precision) && (ABS(z) < precision);
}

void Vector::out() const
{
	std::cout << " Vecteur :";
	std::cout << " " << x << "," << y << "," << z << std::endl;
}
