From 7931278c0ffdc5fc008d28af43b7e907899809b4 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 15 Jun 2011 23:55:49 +0100 Subject: [PATCH] Fixed mix with bool, ticket #107 --- glm/core/func_common.inl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index df572cf4..868b930a 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -936,7 +936,7 @@ namespace glm { GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); - return a ? x : y; + return a ? y : x; } template @@ -957,7 +957,7 @@ namespace glm ++i ) { - result[i] = a[i] ? x[i] : y[i]; + result[i] = a[i] ? y[i] : x[i]; } return result; } @@ -980,7 +980,7 @@ namespace glm ++i ) { - result[i] = a[i] ? x[i] : y[i]; + result[i] = a[i] ? y[i] : x[i]; } return result; } @@ -1003,7 +1003,7 @@ namespace glm ++i ) { - result[i] = a[i] ? x[i] : y[i]; + result[i] = a[i] ? y[i] : x[i]; } return result; }