fart/util/Vector.h
Josh Holtrop 0e93e2c76d updated Makefile, main/fart.cc, util/Vector.h
git-svn-id: svn://anubis/fart/trunk@5 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-01-18 02:10:23 +00:00

24 lines
496 B
C++

#ifndef VECTOR_H
#define VECTOR_H VECTOR_H
#include <iostream>
class Vector
{
public:
Vector();
double & operator[](int idx) { return m_array[idx]; }
double operator[](int idx) const { return m_array[idx]; }
void normalize();
private:
double m_array[3];
};
std::ostream & operator<<(std::ostream & out, const Vector & v);
double operator%(const Vector & v1, const Vector & v2);
Vector operator*(const Vector & v1, const Vector & v2);
#endif