Fantasizing about C API and plugins
This commit is contained in:
58
include/vecmath.h
Normal file
58
include/vecmath.h
Normal 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
|
||||
Reference in New Issue
Block a user