diff --git a/glm/core/func_common.inl b/glm/core/func_common.inl index 53a578c2..1e9df946 100644 --- a/glm/core/func_common.inl +++ b/glm/core/func_common.inl @@ -948,7 +948,7 @@ namespace detail { GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); - return a ? x : y; + return a ? y : x; } template @@ -969,7 +969,7 @@ namespace detail ++i ) { - result[i] = a[i] ? x[i] : y[i]; + result[i] = a[i] ? y[i] : x[i]; } return result; } @@ -992,7 +992,7 @@ namespace detail ++i ) { - result[i] = a[i] ? x[i] : y[i]; + result[i] = a[i] ? y[i] : x[i]; } return result; } @@ -1015,7 +1015,7 @@ namespace detail ++i ) { - result[i] = a[i] ? x[i] : y[i]; + result[i] = a[i] ? y[i] : x[i]; } return result; }