#ifndef Vector_hpp
#define Vector_hpp

#include "Math.hpp"
#include <iostream>

class Matrix;

class Vector {
public:
  static const Vector X;
  static const Vector Y;
  static const Vector Z;
  static const Vector Zero;
  double x;
  double y;
  double z;
  Vector(
    const double x = 0.0,
    const double y = 0.0,
    const double z = 0.0
  );
  Vector& set(
    const double x = 0.0,
    const double y = 0.0,
    const double z = 0.0
  );
  Vector& neg();
  Vector& zero();
  Vector& round(const double precision = 1);
  Vector& normalize();
  Vector& randomize(const Vector& factor);
  Vector& rotateX(const double rad);
  Vector& rotateY(const double rad);
  Vector& rotateZ(const double rad);
  Vector& scale(const Vector& v);
  const double getCos(const Vector& v) const;
  const double getSin(const Vector& v) const;
  const double getLength() const;
  const double getDistance(const Vector& v) const;
  const double getSquaredLength() const;
  const double getScalar(const Vector& v) const;
  const Vector& getCenter(const Vector& v) const;
  Vector& operator += (const Vector& v);
  Vector& operator -= (const Vector& v);
  Vector& operator *= (const double f);
  Vector& operator /= (const double f);
  Vector& operator *= (const Vector& v);
  Vector& operator *= (const Matrix& m);
  std::ostream& operator >> (std::ostream& os) const;
};

const bool operator == (const Vector& a, const Vector& b);
const bool operator != (const Vector& a, const Vector& b);

std::ostream& operator << (
  std::ostream& os,
  const Vector& v
);

#endif
