summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge <[email protected]>2020-04-20 09:19:05 +0200
committerTyge <[email protected]>2020-04-20 09:19:05 +0200
commitbb17e8580bae52fe811e3b4e1cef9d8d77db02d1 (patch)
treef214941253a27185d8e39d52b9de186662d22a87
parent65657dd7755d439e221be3eaa7c7b8de473ee5b9 (diff)
downloadSTC-modified-bb17e8580bae52fe811e3b4e1cef9d8d77db02d1.tar.gz
STC-modified-bb17e8580bae52fe811e3b4e1cef9d8d77db02d1.zip
glm update
-rw-r--r--glm/quat.h2
-rw-r--r--glm/vec3.h11
-rw-r--r--glm/vec4.h11
3 files changed, 13 insertions, 11 deletions
diff --git a/glm/quat.h b/glm/quat.h
index 98afb5d5..8a237237 100644
--- a/glm/quat.h
+++ b/glm/quat.h
@@ -60,7 +60,7 @@
real_part = 0; \
t = fabs(u.x) > fabs(u.z) ? (glm_vec3##tag) {-u.y, u.x, 0} : (glm_vec3##tag) {0, -u.z, u.y}; \
} else /* Build quaternion the standard way.*/ \
- t = _glm_vec3_CROSS(u, v); \
+ t = (glm_vec3##tag) {_glm_vec3_CROSS(u, v)}; \
glm_quat##tag q = (glm_quat##tag) {t.x, t.y, t.z, real_part}; \
return glm_quat##tag##_normalize(q); \
} \
diff --git a/glm/vec3.h b/glm/vec3.h
index d741d9ce..1d4b0312 100644
--- a/glm/vec3.h
+++ b/glm/vec3.h
@@ -155,25 +155,26 @@
return u; \
} \
/* Swizzle */ \
+ static inline glm_vec3##tag \
glm_vec3##tag##_xzy(glm_vec3##tag u) { \
return (glm_vec3##tag) {u.x, u.z, u.y}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec3##tag##_yxz(glm_vec3##tag u) { \
return (glm_vec3##tag) {u.y, u.x, u.z}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec3##tag##_yzx(glm_vec3##tag u) { \
return (glm_vec3##tag) {u.y, u.z, u.x}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec3##tag##_zxy(glm_vec3##tag u) { \
return (glm_vec3##tag) {u.z, u.x, u.y}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec3##tag##_zyx(glm_vec3##tag u) { \
return (glm_vec3##tag) {u.z, u.y, u.x}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec3##tag##_swizzle(glm_vec3##tag u, const char* swz) { \
T* a = glm_vec3_arr(u); \
diff --git a/glm/vec4.h b/glm/vec4.h
index ac7a1e4f..761b2237 100644
--- a/glm/vec4.h
+++ b/glm/vec4.h
@@ -113,25 +113,26 @@
glm_vec4##tag##_xyz(glm_vec4##tag u) { \
return (glm_vec3##tag) {u.x, u.y, u.z}; \
}; \
+ static inline glm_vec3##tag \
glm_vec4##tag##_xzy(glm_vec4##tag u) { \
return (glm_vec3##tag) {u.x, u.z, u.y}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec4##tag##_yxz(glm_vec4##tag u) { \
return (glm_vec3##tag) {u.y, u.x, u.z}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec4##tag##_yzx(glm_vec4##tag u) { \
return (glm_vec3##tag) {u.y, u.z, u.x}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec4##tag##_zxy(glm_vec4##tag u) { \
return (glm_vec3##tag) {u.z, u.x, u.y}; \
- }; \
+ } \
static inline glm_vec3##tag \
glm_vec4##tag##_zyx(glm_vec4##tag u) { \
return (glm_vec3##tag) {u.z, u.y, u.x}; \
- }; \
+ } \
\
static inline glm_vec4##tag \
glm_vec4##tag##_swizzle(glm_vec4##tag u, const char* swz) { \