projects
/
csrpg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80bcb5b
)
added vec2_t
author
matthew
<matthew@owens.tech>
Sat, 3 Nov 2018 16:18:35 +0000
(16:18 +0000)
committer
matthew
<matthew@owens.tech>
Sat, 3 Nov 2018 16:18:35 +0000
(16:18 +0000)
gl/math_3d.h
patch
|
blob
|
history
diff --git
a/gl/math_3d.h
b/gl/math_3d.h
index
754603d
..
c5d0ffa
100644
(file)
--- a/
gl/math_3d.h
+++ b/
gl/math_3d.h
@@
-96,6
+96,9
@@
v1.0 2016-02-15 Initial release
// So you can just upload the vectors into shaders as they are.
//
+typedef struct { float x, y; } vec2_t;
+static inline vec2_t vec2(float x, float y) { return (vec2_t){ x, y }; }
+
typedef struct { float x, y, z; } vec3_t;
static inline vec3_t vec3(float x, float y, float z) { return (vec3_t){ x, y, z }; }