rayfract

view src/vmath.h @ 3:bf1d56975cc9

- added visual studio project - removed vmath dependency
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 26 Oct 2010 09:52:57 +0300
parents
children
line source
1 #ifndef VMATH_H_
2 #define VMATH_H_
4 class Vector2 {
5 public:
6 float x, y;
8 Vector2();
9 Vector2(float x, float y);
10 };
12 Vector2 operator +(const Vector2 &a, const Vector2 &b);
13 Vector2 operator *(const Vector2 &v, float s);
15 class Vector3 {
16 public:
17 float x, y, z;
19 Vector3();
20 Vector3(float x, float y, float z);
21 };
23 class Vector4 {
24 public:
25 float x, y, z, w;
27 Vector4();
28 Vector4(float x, float y, float z, float w);
30 float &operator [](int idx);
31 const float &operator [](int idx) const;
32 };
34 #endif /* VMATH_H_ */