diff --git a/glm/core/func_vector_relational.hpp b/glm/core/func_vector_relational.hpp
index 4ee7b46c..6e935124 100644
--- a/glm/core/func_vector_relational.hpp
+++ b/glm/core/func_vector_relational.hpp
@@ -106,8 +106,8 @@ namespace glm
///
/// @see GLSL any man page
/// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
- template class vecType>
- bool any(vecType const & v);
+ template class vecType>
+ bool any(vecType const & v);
/// Returns true if all components of x are true.
///
@@ -115,8 +115,8 @@ namespace glm
///
/// @see GLSL all man page
/// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
- template class vecType>
- bool all(vecType const & v);
+ template class vecType>
+ bool all(vecType const & v);
/// Returns the component-wise logical complement of x.
/// /!\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.
@@ -125,8 +125,8 @@ namespace glm
///
/// @see GLSL not man page
/// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions
- template class vecType>
- vecType not_(vecType const & v);
+ template class vecType>
+ vecType not_(vecType const & v);
/// @}
}//namespace glm
diff --git a/test/core/CMakeLists.txt b/test/core/CMakeLists.txt
index 2528da85..4eb28256 100644
--- a/test/core/CMakeLists.txt
+++ b/test/core/CMakeLists.txt
@@ -1,3 +1,4 @@
+glmCreateTestGTC(core_type_cast)
glmCreateTestGTC(core_type_float)
glmCreateTestGTC(core_type_half)
glmCreateTestGTC(core_type_int)
diff --git a/test/core/core_type_cast.cpp b/test/core/core_type_cast.cpp
new file mode 100644
index 00000000..cb121c87
--- /dev/null
+++ b/test/core/core_type_cast.cpp
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Created : 2013-05-06
+// Updated : 2013-05-06
+// Licence : This source is under MIT License
+// File : test/core/type_cast.cpp
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#include
+
+int test_vec2_cast()
+{
+ glm::vec2 A(1.0f, 2.0f);
+ glm::lowp_vec2 B(A);
+ glm::mediump_vec2 C(A);
+ glm::highp_vec2 D(A);
+
+ glm::vec2 E = static_cast(A);
+ glm::lowp_vec2 F = static_cast(A);
+ glm::mediump_vec2 G = static_cast(A);
+ glm::highp_vec2 H = static_cast(A);
+
+ int Error(0);
+
+ Error += glm::all(glm::equal(A, E)) ? 0 : 1;
+ Error += glm::all(glm::equal(B, F)) ? 0 : 1;
+ Error += glm::all(glm::equal(C, G)) ? 0 : 1;
+ Error += glm::all(glm::equal(D, H)) ? 0 : 1;
+
+ return Error;
+}
+
+int test_vec3_cast()
+{
+ glm::vec3 A(1.0f, 2.0f, 3.0f);
+ glm::lowp_vec3 B(A);
+ glm::mediump_vec3 C(A);
+ glm::highp_vec3 D(A);
+
+ glm::vec3 E = static_cast(A);
+ glm::lowp_vec3 F = static_cast(A);
+ glm::mediump_vec3 G = static_cast(A);
+ glm::highp_vec3 H = static_cast(A);
+
+ int Error(0);
+
+ Error += glm::all(glm::equal(A, E)) ? 0 : 1;
+ Error += glm::all(glm::equal(B, F)) ? 0 : 1;
+ Error += glm::all(glm::equal(C, G)) ? 0 : 1;
+ Error += glm::all(glm::equal(D, H)) ? 0 : 1;
+
+ return Error;
+}
+
+int test_vec4_cast()
+{
+ glm::vec4 A(1.0f, 2.0f, 3.0f, 4.0f);
+ glm::lowp_vec4 B(A);
+ glm::mediump_vec4 C(A);
+ glm::highp_vec4 D(A);
+
+ glm::vec4 E = static_cast(A);
+ glm::lowp_vec4 F = static_cast(A);
+ glm::mediump_vec4 G = static_cast(A);
+ glm::highp_vec4 H = static_cast(A);
+
+ int Error(0);
+
+ Error += glm::all(glm::equal(A, E)) ? 0 : 1;
+ Error += glm::all(glm::equal(B, F)) ? 0 : 1;
+ Error += glm::all(glm::equal(C, G)) ? 0 : 1;
+ Error += glm::all(glm::equal(D, H)) ? 0 : 1;
+
+ return Error;
+}
+
+int main()
+{
+ int Error = 0;
+
+ Error += test_vec2_cast();
+ Error += test_vec3_cast();
+ Error += test_vec4_cast();
+
+ return Error;
+}