From 0be0a2cb41d773c8ac8e6292fe2cc295e564b04c Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Wed, 30 Jan 2013 08:06:14 +0000 Subject: [PATCH 1/2] Fix a warning in func_integer.inl The lack of parenthesis triggered -Wshift-op-parentheses in Clang 3.2 --- glm/core/func_integer.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/core/func_integer.inl b/glm/core/func_integer.inl index ae7bf8af..a74a367b 100644 --- a/glm/core/func_integer.inl +++ b/glm/core/func_integer.inl @@ -103,7 +103,7 @@ namespace glm if(x > y) return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); else - return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y)); + return genUType((detail::highp_int_t(1) << detail::highp_int_t(32)) + detail::highp_int_t(x) - detail::highp_int_t(y)); } template From e6b8f7a40ecb7ac893c64d9a0dd7b7dfe8566c1c Mon Sep 17 00:00:00 2001 From: Dave Reid Date: Fri, 1 Feb 2013 07:30:38 +1000 Subject: [PATCH 2/2] Fix a bug in glm::perspective() where a degrees-to-radians conversion is being performed twice. --- glm/gtc/matrix_transform.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/gtc/matrix_transform.inl b/glm/gtc/matrix_transform.inl index 90af5db6..ab8b9a5f 100644 --- a/glm/gtc/matrix_transform.inl +++ b/glm/gtc/matrix_transform.inl @@ -242,7 +242,7 @@ namespace glm valType const rad = glm::radians(fovy); #endif - valType range = tan(radians(rad / valType(2))) * zNear; + valType range = tan(rad / valType(2)) * zNear; valType left = -range * aspect; valType right = range * aspect; valType bottom = -range;