Unuk/trunk/src/libUnuk/Vec2.h
Rtch90 2558e95d9b Change:
-- Still paying with branching and merging.
2011-10-13 13:45:47 +01:00

34 lines
598 B
C++

#ifndef _VEC2_H_
#define _VEC2_H_
class Vec2
{
public:
static Vec2 Zero();
Vec2(void);
Vec2(float xValue, float yValue);
Vec2(const Vec2 &v);
~Vec2(void);
// the operators are required to allow the system to understand how to compute mathematical problems
// Copy operator
Vec2& operator=(const Vec2 &v);
// Addition operator
Vec2& operator+=(const Vec2 &v);
// Subtraction operator
Vec2& operator-=(const Vec2 &v);
// Multiply by a scalar
Vec2& operator*=(float c);
// Multiply by a vector2.
Vec2& operator*=(const Vec2 &v);
float x;
float y;
};
#endif