Fantasizing about C API and plugins

This commit is contained in:
2026-01-16 20:28:08 +01:00
parent 133994d2ef
commit 33a0b241ef
5 changed files with 232 additions and 9 deletions

58
include/vecmath.h Normal file
View File

@@ -0,0 +1,58 @@
#ifndef _VECMATH_H
#define _VECMATH_H
typedef union vec2_t {
struct {
float x;
float y;
};
float v[2];
} vec2_t;
typedef union vec3_t {
struct {
float x;
float y;
float z;
};
float v[3];
} vec3_t;
typedef union vec4_t {
struct {
float x;
float y;
float z;
float w;
};
float v[4];
} vec4_t;
typedef union ivec2_t {
struct {
int x;
int y;
};
int v[2];
} vec2_t;
typedef union ivec3_t {
struct {
int x;
int y;
int z;
};
int v[3];
} vec3_t;
typedef union ivec4_t {
struct {
int x;
int y;
int z;
int w;
};
int v[4];
} vec4_t;
#endif