48 lines
797 B
C
48 lines
797 B
C
#ifndef INCLUDE_WAYLANDCLIENT_TYPES_H_
|
|
#define INCLUDE_WAYLANDCLIENT_TYPES_H_
|
|
|
|
#define PI 3.141592653589793238462643f
|
|
|
|
// struct vec2 {
|
|
// union {
|
|
// struct {
|
|
// float x, y;
|
|
// };
|
|
// float arr[2];
|
|
// };
|
|
// };
|
|
struct Vec2 {
|
|
float x, y;
|
|
};
|
|
#define vec2_mul(v, n) \
|
|
(struct Vec2) { (v).x *(n), (v).y *(n) }
|
|
struct Vec2 vec2_normalize(struct Vec2 v);
|
|
|
|
struct IVec2 {
|
|
int x, y;
|
|
};
|
|
|
|
// struct vec3 {
|
|
// union {
|
|
// struct {
|
|
// float x, y, z;
|
|
// };
|
|
// struct {
|
|
// float r, g, b;
|
|
// };
|
|
// float arr[3];
|
|
// };
|
|
// };
|
|
struct Vec3 {
|
|
float x, y, z;
|
|
};
|
|
struct Vec4 {
|
|
float x, y, z, w;
|
|
};
|
|
|
|
struct Vertex {
|
|
struct Vec2 pos;
|
|
struct Vec3 col;
|
|
};
|
|
|
|
#endif // INCLUDE_WAYLANDCLIENT_TYPES_H_
|