Christophe Riccio 9 éve
szülő
commit
44a981ea68
49 módosított fájl, 213 hozzáadás és 113 törlés
  1. 1 1
      glm/detail/type_mat2x2.hpp
  2. 0 6
      glm/detail/type_mat2x2.inl
  3. 1 1
      glm/detail/type_mat2x3.hpp
  4. 0 6
      glm/detail/type_mat2x3.inl
  5. 1 1
      glm/detail/type_mat2x4.hpp
  6. 0 6
      glm/detail/type_mat2x4.inl
  7. 1 1
      glm/detail/type_mat3x2.hpp
  8. 0 6
      glm/detail/type_mat3x2.inl
  9. 1 1
      glm/detail/type_mat3x3.hpp
  10. 0 6
      glm/detail/type_mat3x3.inl
  11. 1 1
      glm/detail/type_mat3x4.hpp
  12. 0 6
      glm/detail/type_mat3x4.inl
  13. 1 1
      glm/detail/type_mat4x2.hpp
  14. 0 6
      glm/detail/type_mat4x2.inl
  15. 1 1
      glm/detail/type_mat4x3.hpp
  16. 0 6
      glm/detail/type_mat4x3.inl
  17. 1 1
      glm/detail/type_mat4x4.hpp
  18. 0 6
      glm/detail/type_mat4x4.inl
  19. 1 1
      glm/detail/type_vec1.hpp
  20. 0 6
      glm/detail/type_vec1.inl
  21. 1 1
      glm/detail/type_vec2.hpp
  22. 0 6
      glm/detail/type_vec2.inl
  23. 1 1
      glm/detail/type_vec3.hpp
  24. 0 6
      glm/detail/type_vec3.inl
  25. 1 1
      glm/detail/type_vec4.hpp
  26. 0 6
      glm/detail/type_vec4.inl
  27. 1 1
      glm/gtc/quaternion.hpp
  28. 0 6
      glm/gtc/quaternion.inl
  29. 1 1
      glm/gtc/random.inl
  30. 1 1
      glm/gtx/dual_quaternion.hpp
  31. 0 6
      glm/gtx/dual_quaternion.inl
  32. 2 1
      readme.md
  33. 16 1
      test/core/core_func_noise.cpp
  34. 15 0
      test/core/core_type_mat2x2.cpp
  35. 15 0
      test/core/core_type_mat2x3.cpp
  36. 15 0
      test/core/core_type_mat2x4.cpp
  37. 15 0
      test/core/core_type_mat3x2.cpp
  38. 15 0
      test/core/core_type_mat3x3.cpp
  39. 15 0
      test/core/core_type_mat3x4.cpp
  40. 15 0
      test/core/core_type_mat4x2.cpp
  41. 15 0
      test/core/core_type_mat4x3.cpp
  42. 15 0
      test/core/core_type_mat4x4.cpp
  43. 4 2
      test/core/core_type_vec1.cpp
  44. 2 0
      test/core/core_type_vec2.cpp
  45. 3 0
      test/core/core_type_vec3.cpp
  46. 2 0
      test/core/core_type_vec4.cpp
  47. 16 1
      test/gtc/gtc_quaternion.cpp
  48. 16 1
      test/gtx/gtx_dual_quaternion.cpp
  49. 1 1
      test/gtx/gtx_quaternion.cpp

+ 1 - 1
glm/detail/type_mat2x2.hpp

@@ -69,7 +69,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 2;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat2x2.inl

@@ -154,12 +154,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2<T, P>::length_type tmat2x2<T, P>::length() const
-	{
-		return 2;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type & tmat2x2<T, P>::operator[](typename tmat2x2<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_mat2x3.hpp

@@ -70,7 +70,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 2;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat2x3.inl

@@ -154,12 +154,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3<T, P>::length_type tmat2x3<T, P>::length() const
-	{
-		return 2;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type & tmat2x3<T, P>::operator[](typename tmat2x3<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_mat2x4.hpp

@@ -72,7 +72,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 2;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat2x4.inl

@@ -155,12 +155,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4<T, P>::length_type tmat2x4<T, P>::length() const
-	{
-		return 2;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type & tmat2x4<T, P>::operator[](typename tmat2x4<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_mat3x2.hpp

@@ -77,7 +77,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 3;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat3x2.inl

@@ -184,12 +184,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2<T, P>::length_type tmat3x2<T, P>::length() const
-	{
-		return 3;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type & tmat3x2<T, P>::operator[](typename tmat3x2<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_mat3x3.hpp

@@ -76,7 +76,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 3;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat3x3.inl

@@ -186,12 +186,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3<T, P>::length_type tmat3x3<T, P>::length() const
-	{
-		return 3;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type & tmat3x3<T, P>::operator[](typename tmat3x3<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_mat3x4.hpp

@@ -77,7 +77,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 3;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat3x4.inl

@@ -184,12 +184,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4<T, P>::length_type tmat3x4<T, P>::length() const
-	{
-		return 3;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type & tmat3x4<T, P>::operator[](typename tmat3x4<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_mat4x2.hpp

@@ -82,7 +82,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 4;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat4x2.inl

@@ -213,12 +213,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2<T, P>::length_type tmat4x2<T, P>::length() const
-	{
-		return 4;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type & tmat4x2<T, P>::operator[](typename tmat4x2<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_mat4x3.hpp

@@ -82,7 +82,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 4;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat4x3.inl

@@ -206,12 +206,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3<T, P>::length_type tmat4x3<T, P>::length() const
-	{
-		return 4;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & tmat4x3<T, P>::operator[](typename tmat4x3<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_mat4x4.hpp

@@ -81,7 +81,7 @@ namespace glm
 		// -- Accesses --
 
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 4;}
 
 		GLM_FUNC_DECL col_type & operator[](length_type i);
 		GLM_FUNC_DECL col_type const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_mat4x4.inl

@@ -236,12 +236,6 @@ namespace glm
 
 	// -- Accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4<T, P>::length_type tmat4x4<T, P>::length() const
-	{
-		return 4;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type & tmat4x4<T, P>::operator[](typename tmat4x4<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_vec1.hpp

@@ -75,7 +75,7 @@ namespace glm
 
 		/// Return the count of components of the vector
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 1;}
 
 		GLM_FUNC_DECL T & operator[](length_type i);
 		GLM_FUNC_DECL T const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_vec1.inl

@@ -66,12 +66,6 @@ namespace glm
 
 	// -- Component accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1<T, P>::length_type tvec1<T, P>::length() const
-	{
-		return 1;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER T & tvec1<T, P>::operator[](typename tvec1<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_vec2.hpp

@@ -76,7 +76,7 @@ namespace glm
 
 		/// Return the count of components of the vector
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 2;}
 
 		GLM_FUNC_DECL T & operator[](length_type i);
 		GLM_FUNC_DECL T const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_vec2.inl

@@ -97,12 +97,6 @@ namespace glm
 
 	// -- Component accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2<T, P>::length_type tvec2<T, P>::length() const
-	{
-		return 2;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_vec3.hpp

@@ -76,7 +76,7 @@ namespace glm
 
 		/// Return the count of components of the vector
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 3;}
 
 		GLM_FUNC_DECL T & operator[](length_type i);
 		GLM_FUNC_DECL T const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_vec3.inl

@@ -139,12 +139,6 @@ namespace glm
 
 	// -- Component accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3<T, P>::length_type tvec3<T, P>::length() const
-	{
-		return 3;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](typename tvec3<T, P>::length_type i)
 	{

+ 1 - 1
glm/detail/type_vec4.hpp

@@ -79,7 +79,7 @@ namespace glm
 
 		/// Return the count of components of the vector
 		typedef length_t length_type;
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 4;}
 
 		GLM_FUNC_DECL T & operator[](length_type i);
 		GLM_FUNC_DECL T const & operator[](length_type i) const;

+ 0 - 6
glm/detail/type_vec4.inl

@@ -324,12 +324,6 @@ namespace detail
 
 	// -- Component accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4<T, P>::length_type tvec4<T, P>::length() const
-	{
-		return 4;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER T & tvec4<T, P>::operator[](typename tvec4<T, P>::length_type i)
 	{

+ 1 - 1
glm/gtc/quaternion.hpp

@@ -71,7 +71,7 @@ namespace glm
 
 		typedef length_t length_type;
 		/// Return the count of components of a quaternion
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 4;}
 
 		GLM_FUNC_DECL T & operator[](length_type i);
 		GLM_FUNC_DECL T const & operator[](length_type i) const;

+ 0 - 6
glm/gtc/quaternion.inl

@@ -67,12 +67,6 @@ namespace detail
 
 	// -- Component accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tquat<T, P>::length_type tquat<T, P>::length() const
-	{
-		return 4;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER T & tquat<T, P>::operator[](typename tquat<T, P>::length_type i)
 	{

+ 1 - 1
glm/gtc/random.inl

@@ -154,7 +154,7 @@ namespace detail
 			return (compute_rand<uint32, P, vecType>::call() % (Max + static_cast<uint32>(1) - Min)) + Min;
 		}
 	};
-
+ 
 	template <precision P, template <class, precision> class vecType>
 	struct compute_linearRand<int64, P, vecType>
 	{

+ 1 - 1
glm/gtx/dual_quaternion.hpp

@@ -46,7 +46,7 @@ namespace glm
 
 		typedef length_t length_type;
 		/// Return the count of components of a dual quaternion
-		GLM_FUNC_DECL GLM_CONSTEXPR length_type length() const;
+		GLM_FUNC_DECL static length_type length(){return 2;}
 
 		GLM_FUNC_DECL part_type & operator[](length_type i);
 		GLM_FUNC_DECL part_type const & operator[](length_type i) const;

+ 0 - 6
glm/gtx/dual_quaternion.inl

@@ -8,12 +8,6 @@ namespace glm
 {
 	// -- Component accesses --
 
-	template <typename T, precision P>
-	GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tdualquat<T, P>::length_type tdualquat<T, P>::length() const
-	{
-		return 2;
-	}
-
 	template <typename T, precision P>
 	GLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator[](typename tdualquat<T, P>::length_type i)
 	{

+ 2 - 1
readme.md

@@ -70,13 +70,14 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
 - Removed GLM_DEPTH_ZERO_TO_ONE, use GLM_FORCE_DEPTH_ZERO_TO_ONE instead
 - Removed GLM_LEFT_HANDED, use GLM_FORCE_LEFT_HANDED instead
 
-#### [GLM 0.9.8.2](https://github.com/g-truc/glm/tree/0.9.8) - 2016-XX-XX
+#### [GLM 0.9.8.2](https://github.com/g-truc/glm/releases/tag/0.9.8.2) - 2016-11-01
 ##### Improvements:
 - Added Visual C++ 15 detection
 - Added Clang 4.0 detection
 - Added warning messages when using GLM_FORCE_CXX** but the compiler
   is known to not fully support the requested C++ version #555
 - Refactored GLM_COMPILER_VC values
+- Made quat, vec, mat type component length() static #565
 
 ##### Fixes:
 - Fixed Visual C++ constexpr build error #555, #556

+ 16 - 1
test/core/core_func_noise.cpp

@@ -1,7 +1,22 @@
+struct vec4
+{
+	static int length();
+};
+
+int vec4::length()
+{
+	return 4;
+}
+
 int main()
 {
 	int Failed = 0;
-	
+
+	vec4 V;
+
+	int LengthA = V.length();
+	int LengthB = vec4::length();
+
 	return Failed;
 }
 

+ 15 - 0
test/core/core_type_mat2x2.cpp

@@ -132,6 +132,20 @@ namespace cast
 	}
 }//namespace cast
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 16 == sizeof(glm::mat2x2) ? 0 : 1;
+	Error += 32 == sizeof(glm::dmat2x2) ? 0 : 1;
+	Error += glm::mat2x2().length() == 2 ? 0 : 1;
+	Error += glm::dmat2x2().length() == 2 ? 0 : 1;
+	Error += glm::mat2x2::length() == 2 ? 0 : 1;
+	Error += glm::dmat2x2::length() == 2 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error(0);
@@ -140,6 +154,7 @@ int main()
 	Error += test_ctr();
 	Error += test_operators();
 	Error += test_inverse();
+	Error += test_size();
 
 	return Error;
 }

+ 15 - 0
test/core/core_type_mat2x3.cpp

@@ -106,6 +106,20 @@ namespace cast
 	}
 }//namespace cast
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 24 == sizeof(glm::mat2x3) ? 0 : 1;
+	Error += 48 == sizeof(glm::dmat2x3) ? 0 : 1;
+	Error += glm::mat2x3().length() == 2 ? 0 : 1;
+	Error += glm::dmat2x3().length() == 2 ? 0 : 1;
+	Error += glm::mat2x3::length() == 2 ? 0 : 1;
+	Error += glm::dmat2x3::length() == 2 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
@@ -113,6 +127,7 @@ int main()
 	Error += cast::test();
 	Error += test_ctr();
 	Error += test_operators();
+	Error += test_size();
 
 	return Error;
 }

+ 15 - 0
test/core/core_type_mat2x4.cpp

@@ -106,6 +106,20 @@ namespace cast
 	}
 }//namespace cast
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 32 == sizeof(glm::mat2x4) ? 0 : 1;
+	Error += 64 == sizeof(glm::dmat2x4) ? 0 : 1;
+	Error += glm::mat2x4().length() == 2 ? 0 : 1;
+	Error += glm::dmat2x4().length() == 2 ? 0 : 1;
+	Error += glm::mat2x4::length() == 2 ? 0 : 1;
+	Error += glm::dmat2x4::length() == 2 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
@@ -113,6 +127,7 @@ int main()
 	Error += cast::test();
 	Error += test_ctr();
 	Error += test_operators();
+	Error += test_size();
 
 	return Error;
 }

+ 15 - 0
test/core/core_type_mat3x2.cpp

@@ -110,6 +110,20 @@ namespace cast
 	}
 }//namespace cast
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 24 == sizeof(glm::mat3x2) ? 0 : 1;
+	Error += 48 == sizeof(glm::dmat3x2) ? 0 : 1;
+	Error += glm::mat3x2().length() == 3 ? 0 : 1;
+	Error += glm::dmat3x2().length() == 3 ? 0 : 1;
+	Error += glm::mat3x2::length() == 3 ? 0 : 1;
+	Error += glm::dmat3x2::length() == 3 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
@@ -117,6 +131,7 @@ int main()
 	Error += cast::test();
 	Error += test_ctr();
 	Error += test_operators();
+	Error += test_size();
 
 	return Error;
 }

+ 15 - 0
test/core/core_type_mat3x3.cpp

@@ -169,6 +169,20 @@ namespace cast
 	}
 }//namespace cast
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 36 == sizeof(glm::mat3x3) ? 0 : 1;
+	Error += 72 == sizeof(glm::dmat3x3) ? 0 : 1;
+	Error += glm::mat3x3().length() == 3 ? 0 : 1;
+	Error += glm::dmat3x3().length() == 3 ? 0 : 1;
+	Error += glm::mat3x3::length() == 3 ? 0 : 1;
+	Error += glm::dmat3x3::length() == 3 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
@@ -178,6 +192,7 @@ int main()
 	Error += test_mat3x3();
 	Error += test_operators();
 	Error += test_inverse();
+	Error += test_size();
 
 	return Error;
 }

+ 15 - 0
test/core/core_type_mat3x4.cpp

@@ -110,6 +110,20 @@ namespace cast
 	}
 }//namespace cast
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 48 == sizeof(glm::mat3x4) ? 0 : 1;
+	Error += 96 == sizeof(glm::dmat3x4) ? 0 : 1;
+	Error += glm::mat3x4().length() == 3 ? 0 : 1;
+	Error += glm::dmat3x4().length() == 3 ? 0 : 1;
+	Error += glm::mat3x4::length() == 3 ? 0 : 1;
+	Error += glm::dmat3x4::length() == 3 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
@@ -117,6 +131,7 @@ int main()
 	Error += cast::test();
 	Error += test_ctr();
 	Error += test_operators();
+	Error += test_size();
 
 	return Error;
 }

+ 15 - 0
test/core/core_type_mat4x2.cpp

@@ -114,6 +114,20 @@ namespace cast
 	}
 }//namespace cast
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 32 == sizeof(glm::mat4x2) ? 0 : 1;
+	Error += 64 == sizeof(glm::dmat4x2) ? 0 : 1;
+	Error += glm::mat4x2().length() == 4 ? 0 : 1;
+	Error += glm::dmat4x2().length() == 4 ? 0 : 1;
+	Error += glm::mat4x2::length() == 4 ? 0 : 1;
+	Error += glm::dmat4x2::length() == 4 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
@@ -121,6 +135,7 @@ int main()
 	Error += cast::test();
 	Error += test_ctr();
 	Error += test_operators();
+	Error += test_size();
 
 	return Error;
 }

+ 15 - 0
test/core/core_type_mat4x3.cpp

@@ -114,6 +114,20 @@ namespace cast
 	}
 }//namespace cast
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 48 == sizeof(glm::mat4x3) ? 0 : 1;
+	Error += 96 == sizeof(glm::dmat4x3) ? 0 : 1;
+	Error += glm::mat4x3().length() == 4 ? 0 : 1;
+	Error += glm::dmat4x3().length() == 4 ? 0 : 1;
+	Error += glm::mat4x3::length() == 4 ? 0 : 1;
+	Error += glm::dmat4x3::length() == 4 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
@@ -121,6 +135,7 @@ int main()
 	Error += cast::test();
 	Error += test_ctr();
 	Error += test_operators();
+	Error += test_size();
 
 	return Error;
 }

+ 15 - 0
test/core/core_type_mat4x4.cpp

@@ -294,6 +294,20 @@ struct repro
 	glm::mat4* matrix;
 };
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 64 == sizeof(glm::mat4) ? 0 : 1;
+	Error += 128 == sizeof(glm::dmat4) ? 0 : 1;
+	Error += glm::mat4().length() == 4 ? 0 : 1;
+	Error += glm::dmat4().length() == 4 ? 0 : 1;
+	Error += glm::mat4::length() == 4 ? 0 : 1;
+	Error += glm::dmat4::length() == 4 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
 	int Error = 0;
@@ -306,6 +320,7 @@ int main()
 	Error += test_inverse_mat4x4();
 	Error += test_operators();
 	Error += test_inverse();
+	Error += test_size();
 
 	Error += perf_mul();
 

+ 4 - 2
test/core/core_type_vec1.cpp

@@ -93,14 +93,16 @@ int test_vec1_ctor()
 int test_vec1_size()
 {
 	int Error = 0;
-	
+
 	Error += sizeof(glm::vec1) == sizeof(glm::mediump_vec1) ? 0 : 1;
 	Error += 4 == sizeof(glm::mediump_vec1) ? 0 : 1;
 	Error += sizeof(glm::dvec1) == sizeof(glm::highp_dvec1) ? 0 : 1;
 	Error += 8 == sizeof(glm::highp_dvec1) ? 0 : 1;
 	Error += glm::vec1().length() == 1 ? 0 : 1;
 	Error += glm::dvec1().length() == 1 ? 0 : 1;
-	
+	Error += glm::vec1::length() == 1 ? 0 : 1;
+	Error += glm::dvec1::length() == 1 ? 0 : 1;
+
 	return Error;
 }
 

+ 2 - 0
test/core/core_type_vec2.cpp

@@ -265,6 +265,8 @@ int test_vec2_size()
 	Error += 16 == sizeof(glm::highp_dvec2) ? 0 : 1;
 	Error += glm::vec2().length() == 2 ? 0 : 1;
 	Error += glm::dvec2().length() == 2 ? 0 : 1;
+	Error += glm::vec2::length() == 2 ? 0 : 1;
+	Error += glm::dvec2::length() == 2 ? 0 : 1;
 
 	return Error;
 }

+ 3 - 0
test/core/core_type_vec3.cpp

@@ -239,6 +239,9 @@ int test_vec3_size()
 	Error += 24 == sizeof(glm::highp_dvec3) ? 0 : 1;
 	Error += glm::vec3().length() == 3 ? 0 : 1;
 	Error += glm::dvec3().length() == 3 ? 0 : 1;
+	Error += glm::vec3::length() == 3 ? 0 : 1;
+	Error += glm::dvec3::length() == 3 ? 0 : 1;
+
 	return Error;
 }
 

+ 2 - 0
test/core/core_type_vec4.cpp

@@ -315,6 +315,8 @@ int test_vec4_size()
 	Error += 32 == sizeof(glm::highp_dvec4) ? 0 : 1;
 	Error += glm::vec4().length() == 4 ? 0 : 1;
 	Error += glm::dvec4().length() == 4 ? 0 : 1;
+	Error += glm::vec4::length() == 4 ? 0 : 1;
+	Error += glm::dvec4::length() == 4 ? 0 : 1;
 
 	return Error;
 }

+ 16 - 1
test/gtc/gtc_quaternion.cpp

@@ -291,9 +291,23 @@ int test_quat_ctr()
 	return Error;
 }
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 16 == sizeof(glm::quat) ? 0 : 1;
+	Error += 32 == sizeof(glm::dquat) ? 0 : 1;
+	Error += glm::quat().length() == 4 ? 0 : 1;
+	Error += glm::dquat().length() == 4 ? 0 : 1;
+	Error += glm::quat::length() == 4 ? 0 : 1;
+	Error += glm::dquat::length() == 4 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
-	int Error(0);
+	int Error = 0;
 
 	Error += test_quat_ctr();
 	Error += test_quat_mul_vec();
@@ -307,6 +321,7 @@ int main()
 	Error += test_quat_normalize();
 	Error += test_quat_euler();
 	Error += test_quat_slerp();
+	Error += test_size();
 
 	return Error;
 }

+ 16 - 1
test/gtx/gtx_dual_quaternion.cpp

@@ -174,15 +174,30 @@ int test_dual_quat_ctr()
 	return Error;
 }
 
+int test_size()
+{
+	int Error = 0;
+
+	Error += 32 == sizeof(glm::dualquat) ? 0 : 1;
+	Error += 64 == sizeof(glm::ddualquat) ? 0 : 1;
+	Error += glm::dualquat().length() == 2 ? 0 : 1;
+	Error += glm::ddualquat().length() == 2 ? 0 : 1;
+	Error += glm::dualquat::length() == 2 ? 0 : 1;
+	Error += glm::ddualquat::length() == 2 ? 0 : 1;
+
+	return Error;
+}
+
 int main()
 {
-	int Error(0);
+	int Error = 0;
 
 	Error += test_dual_quat_ctr();
 	Error += test_dquat_type();
 	Error += test_scalars();
 	Error += test_inverse();
 	Error += test_mul();
+	Error += test_size();
 
 	return Error;
 }

+ 1 - 1
test/gtx/gtx_quaternion.cpp

@@ -91,7 +91,7 @@ int test_log()
 
 int main()
 {
-	int Error(0);
+	int Error = 0;
 
 	Error += test_log();
 	Error += test_rotation();