rayfract

view src/vmath.h @ 10:1496aae2e7d4

- simplified build by including dependences in the source tree - added make dep tracking - added mingw cross-build rules - added readme & licence
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 31 Jul 2023 18:58:56 +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_ */