2022-01-28 01:15:26 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace rage
|
|
|
|
{
|
2022-08-31 21:31:52 +02:00
|
|
|
template<typename T>
|
|
|
|
union vector2
|
|
|
|
{
|
|
|
|
T data[2];
|
|
|
|
struct { T x, y; };
|
|
|
|
};
|
|
|
|
|
2022-01-28 01:15:26 +01:00
|
|
|
template<typename T>
|
|
|
|
union vector3
|
|
|
|
{
|
|
|
|
T data[3];
|
2022-01-29 21:33:18 +01:00
|
|
|
struct { T x, y, z; };
|
2022-01-28 01:15:26 +01:00
|
|
|
};
|
|
|
|
|
2022-08-06 13:37:38 -04:00
|
|
|
template<typename T>
|
|
|
|
union vector4
|
|
|
|
{
|
|
|
|
T data[4];
|
|
|
|
struct { T x, y, z, w; };
|
|
|
|
};
|
|
|
|
|
2022-11-06 16:38:41 -05:00
|
|
|
template<typename T>
|
|
|
|
union matrix34
|
|
|
|
{
|
|
|
|
T data[3][4];
|
|
|
|
struct { struct {T x, y, z, w; } rows[3];};
|
|
|
|
};
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
union matrix44
|
|
|
|
{
|
2022-11-09 05:02:11 +08:00
|
|
|
T data[4][4];
|
2022-11-06 16:38:41 -05:00
|
|
|
struct { struct {T x, y, z, w; } rows[4];};
|
|
|
|
};
|
|
|
|
|
2022-08-31 21:31:52 +02:00
|
|
|
typedef vector2<float> fvector2;
|
2022-01-28 01:15:26 +01:00
|
|
|
typedef vector3<float> fvector3;
|
2022-08-06 13:37:38 -04:00
|
|
|
typedef vector4<float> fvector4;
|
2022-11-06 16:38:41 -05:00
|
|
|
typedef matrix34<float> fmatrix34;
|
|
|
|
typedef matrix44<float> fmatrix44;
|
2022-01-28 01:15:26 +01:00
|
|
|
}
|