aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/glm/ext
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-04-10 17:29:02 +0000
committerJoursoir <chat@joursoir.net>2021-04-10 17:29:02 +0000
commita8b3118e8305fd1c668ea25e07157b625c9747ff (patch)
tree69aeec3c40e123443675da381774ef656a2c86e0 /src/include/glm/ext
parent887314d01046ed2c00db3eb7b4b227f070501aa1 (diff)
downloadspace-simulator-a8b3118e8305fd1c668ea25e07157b625c9747ff.tar.gz
space-simulator-a8b3118e8305fd1c668ea25e07157b625c9747ff.tar.bz2
space-simulator-a8b3118e8305fd1c668ea25e07157b625c9747ff.zip
add glm headers
Diffstat (limited to 'src/include/glm/ext')
-rw-r--r--src/include/glm/ext/matrix_clip_space.hpp522
-rw-r--r--src/include/glm/ext/matrix_clip_space.inl555
-rw-r--r--src/include/glm/ext/matrix_common.hpp36
-rw-r--r--src/include/glm/ext/matrix_common.inl16
-rw-r--r--src/include/glm/ext/matrix_double2x2.hpp23
-rw-r--r--src/include/glm/ext/matrix_double2x2_precision.hpp49
-rw-r--r--src/include/glm/ext/matrix_double2x3.hpp18
-rw-r--r--src/include/glm/ext/matrix_double2x3_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_double2x4.hpp18
-rw-r--r--src/include/glm/ext/matrix_double2x4_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_double3x2.hpp18
-rw-r--r--src/include/glm/ext/matrix_double3x2_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_double3x3.hpp23
-rw-r--r--src/include/glm/ext/matrix_double3x3_precision.hpp49
-rw-r--r--src/include/glm/ext/matrix_double3x4.hpp18
-rw-r--r--src/include/glm/ext/matrix_double3x4_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_double4x2.hpp18
-rw-r--r--src/include/glm/ext/matrix_double4x2_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_double4x3.hpp18
-rw-r--r--src/include/glm/ext/matrix_double4x3_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_double4x4.hpp23
-rw-r--r--src/include/glm/ext/matrix_double4x4_precision.hpp49
-rw-r--r--src/include/glm/ext/matrix_float2x2.hpp23
-rw-r--r--src/include/glm/ext/matrix_float2x2_precision.hpp49
-rw-r--r--src/include/glm/ext/matrix_float2x3.hpp18
-rw-r--r--src/include/glm/ext/matrix_float2x3_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_float2x4.hpp18
-rw-r--r--src/include/glm/ext/matrix_float2x4_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_float3x2.hpp18
-rw-r--r--src/include/glm/ext/matrix_float3x2_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_float3x3.hpp23
-rw-r--r--src/include/glm/ext/matrix_float3x3_precision.hpp49
-rw-r--r--src/include/glm/ext/matrix_float3x4.hpp18
-rw-r--r--src/include/glm/ext/matrix_float3x4_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_float4x2.hpp18
-rw-r--r--src/include/glm/ext/matrix_float4x2_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_float4x3.hpp18
-rw-r--r--src/include/glm/ext/matrix_float4x3_precision.hpp31
-rw-r--r--src/include/glm/ext/matrix_float4x4.hpp23
-rw-r--r--src/include/glm/ext/matrix_float4x4_precision.hpp49
-rw-r--r--src/include/glm/ext/matrix_int2x2.hpp38
-rw-r--r--src/include/glm/ext/matrix_int2x2_sized.hpp70
-rw-r--r--src/include/glm/ext/matrix_int2x3.hpp33
-rw-r--r--src/include/glm/ext/matrix_int2x3_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_int2x4.hpp33
-rw-r--r--src/include/glm/ext/matrix_int2x4_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_int3x2.hpp33
-rw-r--r--src/include/glm/ext/matrix_int3x2_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_int3x3.hpp38
-rw-r--r--src/include/glm/ext/matrix_int3x3_sized.hpp70
-rw-r--r--src/include/glm/ext/matrix_int3x4.hpp33
-rw-r--r--src/include/glm/ext/matrix_int3x4_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_int4x2.hpp33
-rw-r--r--src/include/glm/ext/matrix_int4x2_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_int4x3.hpp33
-rw-r--r--src/include/glm/ext/matrix_int4x3_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_int4x4.hpp38
-rw-r--r--src/include/glm/ext/matrix_int4x4_sized.hpp70
-rw-r--r--src/include/glm/ext/matrix_projection.hpp149
-rw-r--r--src/include/glm/ext/matrix_projection.inl106
-rw-r--r--src/include/glm/ext/matrix_relational.hpp132
-rw-r--r--src/include/glm/ext/matrix_relational.inl82
-rw-r--r--src/include/glm/ext/matrix_transform.hpp144
-rw-r--r--src/include/glm/ext/matrix_transform.inl152
-rw-r--r--src/include/glm/ext/matrix_uint2x2.hpp38
-rw-r--r--src/include/glm/ext/matrix_uint2x2_sized.hpp70
-rw-r--r--src/include/glm/ext/matrix_uint2x3.hpp33
-rw-r--r--src/include/glm/ext/matrix_uint2x3_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_uint2x4.hpp33
-rw-r--r--src/include/glm/ext/matrix_uint2x4_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_uint3x2.hpp33
-rw-r--r--src/include/glm/ext/matrix_uint3x2_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_uint3x3.hpp38
-rw-r--r--src/include/glm/ext/matrix_uint3x3_sized.hpp70
-rw-r--r--src/include/glm/ext/matrix_uint3x4.hpp33
-rw-r--r--src/include/glm/ext/matrix_uint3x4_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_uint4x2.hpp33
-rw-r--r--src/include/glm/ext/matrix_uint4x2_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_uint4x3.hpp33
-rw-r--r--src/include/glm/ext/matrix_uint4x3_sized.hpp49
-rw-r--r--src/include/glm/ext/matrix_uint4x4.hpp38
-rw-r--r--src/include/glm/ext/matrix_uint4x4_sized.hpp70
-rw-r--r--src/include/glm/ext/quaternion_common.hpp135
-rw-r--r--src/include/glm/ext/quaternion_common.inl144
-rw-r--r--src/include/glm/ext/quaternion_common_simd.inl18
-rw-r--r--src/include/glm/ext/quaternion_double.hpp39
-rw-r--r--src/include/glm/ext/quaternion_double_precision.hpp42
-rw-r--r--src/include/glm/ext/quaternion_exponential.hpp63
-rw-r--r--src/include/glm/ext/quaternion_exponential.inl85
-rw-r--r--src/include/glm/ext/quaternion_float.hpp39
-rw-r--r--src/include/glm/ext/quaternion_float_precision.hpp36
-rw-r--r--src/include/glm/ext/quaternion_geometric.hpp70
-rw-r--r--src/include/glm/ext/quaternion_geometric.inl36
-rw-r--r--src/include/glm/ext/quaternion_relational.hpp62
-rw-r--r--src/include/glm/ext/quaternion_relational.inl35
-rw-r--r--src/include/glm/ext/quaternion_transform.hpp47
-rw-r--r--src/include/glm/ext/quaternion_transform.inl24
-rw-r--r--src/include/glm/ext/quaternion_trigonometric.hpp63
-rw-r--r--src/include/glm/ext/quaternion_trigonometric.inl34
-rw-r--r--src/include/glm/ext/scalar_common.hpp157
-rw-r--r--src/include/glm/ext/scalar_common.inl152
-rw-r--r--src/include/glm/ext/scalar_constants.hpp40
-rw-r--r--src/include/glm/ext/scalar_constants.inl24
-rw-r--r--src/include/glm/ext/scalar_int_sized.hpp70
-rw-r--r--src/include/glm/ext/scalar_integer.hpp92
-rw-r--r--src/include/glm/ext/scalar_integer.inl243
-rw-r--r--src/include/glm/ext/scalar_packing.hpp32
-rw-r--r--src/include/glm/ext/scalar_packing.inl0
-rw-r--r--src/include/glm/ext/scalar_relational.hpp65
-rw-r--r--src/include/glm/ext/scalar_relational.inl40
-rw-r--r--src/include/glm/ext/scalar_uint_sized.hpp70
-rw-r--r--src/include/glm/ext/scalar_ulp.hpp74
-rw-r--r--src/include/glm/ext/scalar_ulp.inl284
-rw-r--r--src/include/glm/ext/vector_bool1.hpp30
-rw-r--r--src/include/glm/ext/vector_bool1_precision.hpp34
-rw-r--r--src/include/glm/ext/vector_bool2.hpp18
-rw-r--r--src/include/glm/ext/vector_bool2_precision.hpp31
-rw-r--r--src/include/glm/ext/vector_bool3.hpp18
-rw-r--r--src/include/glm/ext/vector_bool3_precision.hpp31
-rw-r--r--src/include/glm/ext/vector_bool4.hpp18
-rw-r--r--src/include/glm/ext/vector_bool4_precision.hpp31
-rw-r--r--src/include/glm/ext/vector_common.hpp204
-rw-r--r--src/include/glm/ext/vector_common.inl129
-rw-r--r--src/include/glm/ext/vector_double1.hpp31
-rw-r--r--src/include/glm/ext/vector_double1_precision.hpp36
-rw-r--r--src/include/glm/ext/vector_double2.hpp18
-rw-r--r--src/include/glm/ext/vector_double2_precision.hpp31
-rw-r--r--src/include/glm/ext/vector_double3.hpp18
-rw-r--r--src/include/glm/ext/vector_double3_precision.hpp34
-rw-r--r--src/include/glm/ext/vector_double4.hpp18
-rw-r--r--src/include/glm/ext/vector_double4_precision.hpp35
-rw-r--r--src/include/glm/ext/vector_float1.hpp31
-rw-r--r--src/include/glm/ext/vector_float1_precision.hpp36
-rw-r--r--src/include/glm/ext/vector_float2.hpp18
-rw-r--r--src/include/glm/ext/vector_float2_precision.hpp31
-rw-r--r--src/include/glm/ext/vector_float3.hpp18
-rw-r--r--src/include/glm/ext/vector_float3_precision.hpp31
-rw-r--r--src/include/glm/ext/vector_float4.hpp18
-rw-r--r--src/include/glm/ext/vector_float4_precision.hpp31
-rw-r--r--src/include/glm/ext/vector_int1.hpp32
-rw-r--r--src/include/glm/ext/vector_int1_sized.hpp49
-rw-r--r--src/include/glm/ext/vector_int2.hpp18
-rw-r--r--src/include/glm/ext/vector_int2_sized.hpp49
-rw-r--r--src/include/glm/ext/vector_int3.hpp18
-rw-r--r--src/include/glm/ext/vector_int3_sized.hpp49
-rw-r--r--src/include/glm/ext/vector_int4.hpp18
-rw-r--r--src/include/glm/ext/vector_int4_sized.hpp49
-rw-r--r--src/include/glm/ext/vector_integer.hpp149
-rw-r--r--src/include/glm/ext/vector_integer.inl85
-rw-r--r--src/include/glm/ext/vector_packing.hpp32
-rw-r--r--src/include/glm/ext/vector_packing.inl0
-rw-r--r--src/include/glm/ext/vector_relational.hpp107
-rw-r--r--src/include/glm/ext/vector_relational.inl75
-rw-r--r--src/include/glm/ext/vector_uint1.hpp32
-rw-r--r--src/include/glm/ext/vector_uint1_sized.hpp49
-rw-r--r--src/include/glm/ext/vector_uint2.hpp18
-rw-r--r--src/include/glm/ext/vector_uint2_sized.hpp49
-rw-r--r--src/include/glm/ext/vector_uint3.hpp18
-rw-r--r--src/include/glm/ext/vector_uint3_sized.hpp49
-rw-r--r--src/include/glm/ext/vector_uint4.hpp18
-rw-r--r--src/include/glm/ext/vector_uint4_sized.hpp49
-rw-r--r--src/include/glm/ext/vector_ulp.hpp109
-rw-r--r--src/include/glm/ext/vector_ulp.inl74
163 files changed, 9035 insertions, 0 deletions
diff --git a/src/include/glm/ext/matrix_clip_space.hpp b/src/include/glm/ext/matrix_clip_space.hpp
new file mode 100644
index 0000000..803b5a2
--- /dev/null
+++ b/src/include/glm/ext/matrix_clip_space.hpp
@@ -0,0 +1,522 @@
+/// @ref ext_matrix_clip_space
+/// @file glm/ext/matrix_clip_space.hpp
+///
+/// @defgroup ext_matrix_clip_space GLM_EXT_matrix_clip_space
+/// @ingroup ext
+///
+/// Defines functions that generate clip space transformation matrices.
+///
+/// The matrices generated by this extension use standard OpenGL fixed-function
+/// conventions. For example, the lookAt function generates a transform from world
+/// space into the specific eye space that the projective matrix functions
+/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility
+/// specifications defines the particular layout of this eye space.
+///
+/// Include <glm/ext/matrix_clip_space.hpp> to use the features of this extension.
+///
+/// @see ext_matrix_transform
+/// @see ext_matrix_projection
+
+#pragma once
+
+// Dependencies
+#include "../ext/scalar_constants.hpp"
+#include "../geometric.hpp"
+#include "../trigonometric.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_clip_space extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_clip_space
+ /// @{
+
+ /// Creates a matrix for projecting two-dimensional coordinates onto the screen.
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top, T const& zNear, T const& zFar)
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluOrtho2D.xml">gluOrtho2D man page</a>
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
+ T left, T right, T bottom, T top);
+
+ /// Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoLH_ZO(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a matrix for an orthographic parallel viewing volume using right-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoLH_NO(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoRH_ZO(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a matrix for an orthographic parallel viewing volume, using right-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoRH_NO(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoZO(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoNO(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a matrix for an orthographic parallel viewing volume, using left-handed coordinates.
+ /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoLH(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a matrix for an orthographic parallel viewing volume, using right-handed coordinates.
+ /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> orthoRH(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a matrix for an orthographic parallel viewing volume, using the default handedness and default near and far clip planes definition.
+ /// To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
+ ///
+ /// @tparam T A floating-point scalar type
+ ///
+ /// @see - glm::ortho(T const& left, T const& right, T const& bottom, T const& top)
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glOrtho.xml">glOrtho man page</a>
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> ortho(
+ T left, T right, T bottom, T top, T zNear, T zFar);
+
+ /// Creates a left handed frustum matrix.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumLH_ZO(
+ T left, T right, T bottom, T top, T near, T far);
+
+ /// Creates a left handed frustum matrix.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumLH_NO(
+ T left, T right, T bottom, T top, T near, T far);
+
+ /// Creates a right handed frustum matrix.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumRH_ZO(
+ T left, T right, T bottom, T top, T near, T far);
+
+ /// Creates a right handed frustum matrix.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumRH_NO(
+ T left, T right, T bottom, T top, T near, T far);
+
+ /// Creates a frustum matrix using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumZO(
+ T left, T right, T bottom, T top, T near, T far);
+
+ /// Creates a frustum matrix using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumNO(
+ T left, T right, T bottom, T top, T near, T far);
+
+ /// Creates a left handed frustum matrix.
+ /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumLH(
+ T left, T right, T bottom, T top, T near, T far);
+
+ /// Creates a right handed frustum matrix.
+ /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustumRH(
+ T left, T right, T bottom, T top, T near, T far);
+
+ /// Creates a frustum matrix with default handedness, using the default handedness and default near and far clip planes definition.
+ /// To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glFrustum.xml">glFrustum man page</a>
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> frustum(
+ T left, T right, T bottom, T top, T near, T far);
+
+
+ /// Creates a matrix for a right handed, symetric perspective-view frustum.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveRH_ZO(
+ T fovy, T aspect, T near, T far);
+
+ /// Creates a matrix for a right handed, symetric perspective-view frustum.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveRH_NO(
+ T fovy, T aspect, T near, T far);
+
+ /// Creates a matrix for a left handed, symetric perspective-view frustum.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveLH_ZO(
+ T fovy, T aspect, T near, T far);
+
+ /// Creates a matrix for a left handed, symetric perspective-view frustum.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveLH_NO(
+ T fovy, T aspect, T near, T far);
+
+ /// Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveZO(
+ T fovy, T aspect, T near, T far);
+
+ /// Creates a matrix for a symetric perspective-view frustum using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveNO(
+ T fovy, T aspect, T near, T far);
+
+ /// Creates a matrix for a right handed, symetric perspective-view frustum.
+ /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveRH(
+ T fovy, T aspect, T near, T far);
+
+ /// Creates a matrix for a left handed, symetric perspective-view frustum.
+ /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveLH(
+ T fovy, T aspect, T near, T far);
+
+ /// Creates a matrix for a symetric perspective-view frustum based on the default handedness and default near and far clip planes definition.
+ /// To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
+ ///
+ /// @param fovy Specifies the field of view angle in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml">gluPerspective man page</a>
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspective(
+ T fovy, T aspect, T near, T far);
+
+ /// Builds a perspective projection matrix based on a field of view using right-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovRH_ZO(
+ T fov, T width, T height, T near, T far);
+
+ /// Builds a perspective projection matrix based on a field of view using right-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovRH_NO(
+ T fov, T width, T height, T near, T far);
+
+ /// Builds a perspective projection matrix based on a field of view using left-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovLH_ZO(
+ T fov, T width, T height, T near, T far);
+
+ /// Builds a perspective projection matrix based on a field of view using left-handed coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovLH_NO(
+ T fov, T width, T height, T near, T far);
+
+ /// Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovZO(
+ T fov, T width, T height, T near, T far);
+
+ /// Builds a perspective projection matrix based on a field of view using left-handed coordinates if GLM_FORCE_LEFT_HANDED if defined or right-handed coordinates otherwise.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovNO(
+ T fov, T width, T height, T near, T far);
+
+ /// Builds a right handed perspective projection matrix based on a field of view.
+ /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovRH(
+ T fov, T width, T height, T near, T far);
+
+ /// Builds a left handed perspective projection matrix based on a field of view.
+ /// If GLM_FORCE_DEPTH_ZERO_TO_ONE is defined, the near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ /// Otherwise, the near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFovLH(
+ T fov, T width, T height, T near, T far);
+
+ /// Builds a perspective projection matrix based on a field of view and the default handedness and default near and far clip planes definition.
+ /// To change default handedness use GLM_FORCE_LEFT_HANDED. To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
+ ///
+ /// @param fov Expressed in radians.
+ /// @param width Width of the viewport
+ /// @param height Height of the viewport
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param far Specifies the distance from the viewer to the far clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> perspectiveFov(
+ T fov, T width, T height, T near, T far);
+
+ /// Creates a matrix for a left handed, symmetric perspective-view frustum with far plane at infinite.
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspectiveLH(
+ T fovy, T aspect, T near);
+
+ /// Creates a matrix for a right handed, symmetric perspective-view frustum with far plane at infinite.
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspectiveRH(
+ T fovy, T aspect, T near);
+
+ /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite with default handedness.
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> infinitePerspective(
+ T fovy, T aspect, T near);
+
+ /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> tweakedInfinitePerspective(
+ T fovy, T aspect, T near);
+
+ /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
+ ///
+ /// @param fovy Specifies the field of view angle, in degrees, in the y direction. Expressed in radians.
+ /// @param aspect Specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height).
+ /// @param near Specifies the distance from the viewer to the near clipping plane (always positive).
+ /// @param ep Epsilon
+ ///
+ /// @tparam T A floating-point scalar type
+ template<typename T>
+ GLM_FUNC_DECL mat<4, 4, T, defaultp> tweakedInfinitePerspective(
+ T fovy, T aspect, T near, T ep);
+
+ /// @}
+}//namespace glm
+
+#include "matrix_clip_space.inl"
diff --git a/src/include/glm/ext/matrix_clip_space.inl b/src/include/glm/ext/matrix_clip_space.inl
new file mode 100644
index 0000000..52c667c
--- /dev/null
+++ b/src/include/glm/ext/matrix_clip_space.inl
@@ -0,0 +1,555 @@
+namespace glm
+{
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> ortho(T left, T right, T bottom, T top)
+ {
+ mat<4, 4, T, defaultp> Result(static_cast<T>(1));
+ Result[0][0] = static_cast<T>(2) / (right - left);
+ Result[1][1] = static_cast<T>(2) / (top - bottom);
+ Result[2][2] = - static_cast<T>(1);
+ Result[3][0] = - (right + left) / (right - left);
+ Result[3][1] = - (top + bottom) / (top - bottom);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoLH_ZO(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+ mat<4, 4, T, defaultp> Result(1);
+ Result[0][0] = static_cast<T>(2) / (right - left);
+ Result[1][1] = static_cast<T>(2) / (top - bottom);
+ Result[2][2] = static_cast<T>(1) / (zFar - zNear);
+ Result[3][0] = - (right + left) / (right - left);
+ Result[3][1] = - (top + bottom) / (top - bottom);
+ Result[3][2] = - zNear / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoLH_NO(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+ mat<4, 4, T, defaultp> Result(1);
+ Result[0][0] = static_cast<T>(2) / (right - left);
+ Result[1][1] = static_cast<T>(2) / (top - bottom);
+ Result[2][2] = static_cast<T>(2) / (zFar - zNear);
+ Result[3][0] = - (right + left) / (right - left);
+ Result[3][1] = - (top + bottom) / (top - bottom);
+ Result[3][2] = - (zFar + zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoRH_ZO(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+ mat<4, 4, T, defaultp> Result(1);
+ Result[0][0] = static_cast<T>(2) / (right - left);
+ Result[1][1] = static_cast<T>(2) / (top - bottom);
+ Result[2][2] = - static_cast<T>(1) / (zFar - zNear);
+ Result[3][0] = - (right + left) / (right - left);
+ Result[3][1] = - (top + bottom) / (top - bottom);
+ Result[3][2] = - zNear / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoRH_NO(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+ mat<4, 4, T, defaultp> Result(1);
+ Result[0][0] = static_cast<T>(2) / (right - left);
+ Result[1][1] = static_cast<T>(2) / (top - bottom);
+ Result[2][2] = - static_cast<T>(2) / (zFar - zNear);
+ Result[3][0] = - (right + left) / (right - left);
+ Result[3][1] = - (top + bottom) / (top - bottom);
+ Result[3][2] = - (zFar + zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoZO(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return orthoLH_ZO(left, right, bottom, top, zNear, zFar);
+# else
+ return orthoRH_ZO(left, right, bottom, top, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoNO(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return orthoLH_NO(left, right, bottom, top, zNear, zFar);
+# else
+ return orthoRH_NO(left, right, bottom, top, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoLH(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return orthoLH_ZO(left, right, bottom, top, zNear, zFar);
+# else
+ return orthoLH_NO(left, right, bottom, top, zNear, zFar);
+# endif
+
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> orthoRH(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return orthoRH_ZO(left, right, bottom, top, zNear, zFar);
+# else
+ return orthoRH_NO(left, right, bottom, top, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> ortho(T left, T right, T bottom, T top, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_LH_ZO
+ return orthoLH_ZO(left, right, bottom, top, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_LH_NO
+ return orthoLH_NO(left, right, bottom, top, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_RH_ZO
+ return orthoRH_ZO(left, right, bottom, top, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_RH_NO
+ return orthoRH_NO(left, right, bottom, top, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumLH_ZO(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+ mat<4, 4, T, defaultp> Result(0);
+ Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
+ Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
+ Result[2][0] = (right + left) / (right - left);
+ Result[2][1] = (top + bottom) / (top - bottom);
+ Result[2][2] = farVal / (farVal - nearVal);
+ Result[2][3] = static_cast<T>(1);
+ Result[3][2] = -(farVal * nearVal) / (farVal - nearVal);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumLH_NO(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+ mat<4, 4, T, defaultp> Result(0);
+ Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
+ Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
+ Result[2][0] = (right + left) / (right - left);
+ Result[2][1] = (top + bottom) / (top - bottom);
+ Result[2][2] = (farVal + nearVal) / (farVal - nearVal);
+ Result[2][3] = static_cast<T>(1);
+ Result[3][2] = - (static_cast<T>(2) * farVal * nearVal) / (farVal - nearVal);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumRH_ZO(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+ mat<4, 4, T, defaultp> Result(0);
+ Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
+ Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
+ Result[2][0] = (right + left) / (right - left);
+ Result[2][1] = (top + bottom) / (top - bottom);
+ Result[2][2] = farVal / (nearVal - farVal);
+ Result[2][3] = static_cast<T>(-1);
+ Result[3][2] = -(farVal * nearVal) / (farVal - nearVal);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumRH_NO(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+ mat<4, 4, T, defaultp> Result(0);
+ Result[0][0] = (static_cast<T>(2) * nearVal) / (right - left);
+ Result[1][1] = (static_cast<T>(2) * nearVal) / (top - bottom);
+ Result[2][0] = (right + left) / (right - left);
+ Result[2][1] = (top + bottom) / (top - bottom);
+ Result[2][2] = - (farVal + nearVal) / (farVal - nearVal);
+ Result[2][3] = static_cast<T>(-1);
+ Result[3][2] = - (static_cast<T>(2) * farVal * nearVal) / (farVal - nearVal);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumZO(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return frustumLH_ZO(left, right, bottom, top, nearVal, farVal);
+# else
+ return frustumRH_ZO(left, right, bottom, top, nearVal, farVal);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumNO(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return frustumLH_NO(left, right, bottom, top, nearVal, farVal);
+# else
+ return frustumRH_NO(left, right, bottom, top, nearVal, farVal);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumLH(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return frustumLH_ZO(left, right, bottom, top, nearVal, farVal);
+# else
+ return frustumLH_NO(left, right, bottom, top, nearVal, farVal);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustumRH(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return frustumRH_ZO(left, right, bottom, top, nearVal, farVal);
+# else
+ return frustumRH_NO(left, right, bottom, top, nearVal, farVal);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> frustum(T left, T right, T bottom, T top, T nearVal, T farVal)
+ {
+# if GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_LH_ZO
+ return frustumLH_ZO(left, right, bottom, top, nearVal, farVal);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_LH_NO
+ return frustumLH_NO(left, right, bottom, top, nearVal, farVal);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_RH_ZO
+ return frustumRH_ZO(left, right, bottom, top, nearVal, farVal);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_RH_NO
+ return frustumRH_NO(left, right, bottom, top, nearVal, farVal);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveRH_ZO(T fovy, T aspect, T zNear, T zFar)
+ {
+ assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
+
+ T const tanHalfFovy = tan(fovy / static_cast<T>(2));
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
+ Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
+ Result[2][2] = zFar / (zNear - zFar);
+ Result[2][3] = - static_cast<T>(1);
+ Result[3][2] = -(zFar * zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveRH_NO(T fovy, T aspect, T zNear, T zFar)
+ {
+ assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
+
+ T const tanHalfFovy = tan(fovy / static_cast<T>(2));
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
+ Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
+ Result[2][2] = - (zFar + zNear) / (zFar - zNear);
+ Result[2][3] = - static_cast<T>(1);
+ Result[3][2] = - (static_cast<T>(2) * zFar * zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveLH_ZO(T fovy, T aspect, T zNear, T zFar)
+ {
+ assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
+
+ T const tanHalfFovy = tan(fovy / static_cast<T>(2));
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
+ Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
+ Result[2][2] = zFar / (zFar - zNear);
+ Result[2][3] = static_cast<T>(1);
+ Result[3][2] = -(zFar * zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveLH_NO(T fovy, T aspect, T zNear, T zFar)
+ {
+ assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
+
+ T const tanHalfFovy = tan(fovy / static_cast<T>(2));
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = static_cast<T>(1) / (aspect * tanHalfFovy);
+ Result[1][1] = static_cast<T>(1) / (tanHalfFovy);
+ Result[2][2] = (zFar + zNear) / (zFar - zNear);
+ Result[2][3] = static_cast<T>(1);
+ Result[3][2] = - (static_cast<T>(2) * zFar * zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveZO(T fovy, T aspect, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return perspectiveLH_ZO(fovy, aspect, zNear, zFar);
+# else
+ return perspectiveRH_ZO(fovy, aspect, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveNO(T fovy, T aspect, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return perspectiveLH_NO(fovy, aspect, zNear, zFar);
+# else
+ return perspectiveRH_NO(fovy, aspect, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveLH(T fovy, T aspect, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return perspectiveLH_ZO(fovy, aspect, zNear, zFar);
+# else
+ return perspectiveLH_NO(fovy, aspect, zNear, zFar);
+# endif
+
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveRH(T fovy, T aspect, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return perspectiveRH_ZO(fovy, aspect, zNear, zFar);
+# else
+ return perspectiveRH_NO(fovy, aspect, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspective(T fovy, T aspect, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_LH_ZO
+ return perspectiveLH_ZO(fovy, aspect, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_LH_NO
+ return perspectiveLH_NO(fovy, aspect, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_RH_ZO
+ return perspectiveRH_ZO(fovy, aspect, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_RH_NO
+ return perspectiveRH_NO(fovy, aspect, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovRH_ZO(T fov, T width, T height, T zNear, T zFar)
+ {
+ assert(width > static_cast<T>(0));
+ assert(height > static_cast<T>(0));
+ assert(fov > static_cast<T>(0));
+
+ T const rad = fov;
+ T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
+ T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = w;
+ Result[1][1] = h;
+ Result[2][2] = zFar / (zNear - zFar);
+ Result[2][3] = - static_cast<T>(1);
+ Result[3][2] = -(zFar * zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovRH_NO(T fov, T width, T height, T zNear, T zFar)
+ {
+ assert(width > static_cast<T>(0));
+ assert(height > static_cast<T>(0));
+ assert(fov > static_cast<T>(0));
+
+ T const rad = fov;
+ T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
+ T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = w;
+ Result[1][1] = h;
+ Result[2][2] = - (zFar + zNear) / (zFar - zNear);
+ Result[2][3] = - static_cast<T>(1);
+ Result[3][2] = - (static_cast<T>(2) * zFar * zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovLH_ZO(T fov, T width, T height, T zNear, T zFar)
+ {
+ assert(width > static_cast<T>(0));
+ assert(height > static_cast<T>(0));
+ assert(fov > static_cast<T>(0));
+
+ T const rad = fov;
+ T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
+ T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = w;
+ Result[1][1] = h;
+ Result[2][2] = zFar / (zFar - zNear);
+ Result[2][3] = static_cast<T>(1);
+ Result[3][2] = -(zFar * zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovLH_NO(T fov, T width, T height, T zNear, T zFar)
+ {
+ assert(width > static_cast<T>(0));
+ assert(height > static_cast<T>(0));
+ assert(fov > static_cast<T>(0));
+
+ T const rad = fov;
+ T const h = glm::cos(static_cast<T>(0.5) * rad) / glm::sin(static_cast<T>(0.5) * rad);
+ T const w = h * height / width; ///todo max(width , Height) / min(width , Height)?
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = w;
+ Result[1][1] = h;
+ Result[2][2] = (zFar + zNear) / (zFar - zNear);
+ Result[2][3] = static_cast<T>(1);
+ Result[3][2] = - (static_cast<T>(2) * zFar * zNear) / (zFar - zNear);
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovZO(T fov, T width, T height, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return perspectiveFovLH_ZO(fov, width, height, zNear, zFar);
+# else
+ return perspectiveFovRH_ZO(fov, width, height, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovNO(T fov, T width, T height, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return perspectiveFovLH_NO(fov, width, height, zNear, zFar);
+# else
+ return perspectiveFovRH_NO(fov, width, height, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovLH(T fov, T width, T height, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return perspectiveFovLH_ZO(fov, width, height, zNear, zFar);
+# else
+ return perspectiveFovLH_NO(fov, width, height, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFovRH(T fov, T width, T height, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return perspectiveFovRH_ZO(fov, width, height, zNear, zFar);
+# else
+ return perspectiveFovRH_NO(fov, width, height, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> perspectiveFov(T fov, T width, T height, T zNear, T zFar)
+ {
+# if GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_LH_ZO
+ return perspectiveFovLH_ZO(fov, width, height, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_LH_NO
+ return perspectiveFovLH_NO(fov, width, height, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_RH_ZO
+ return perspectiveFovRH_ZO(fov, width, height, zNear, zFar);
+# elif GLM_CONFIG_CLIP_CONTROL == GLM_CLIP_CONTROL_RH_NO
+ return perspectiveFovRH_NO(fov, width, height, zNear, zFar);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> infinitePerspectiveRH(T fovy, T aspect, T zNear)
+ {
+ T const range = tan(fovy / static_cast<T>(2)) * zNear;
+ T const left = -range * aspect;
+ T const right = range * aspect;
+ T const bottom = -range;
+ T const top = range;
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
+ Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
+ Result[2][2] = - static_cast<T>(1);
+ Result[2][3] = - static_cast<T>(1);
+ Result[3][2] = - static_cast<T>(2) * zNear;
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> infinitePerspectiveLH(T fovy, T aspect, T zNear)
+ {
+ T const range = tan(fovy / static_cast<T>(2)) * zNear;
+ T const left = -range * aspect;
+ T const right = range * aspect;
+ T const bottom = -range;
+ T const top = range;
+
+ mat<4, 4, T, defaultp> Result(T(0));
+ Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
+ Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
+ Result[2][2] = static_cast<T>(1);
+ Result[2][3] = static_cast<T>(1);
+ Result[3][2] = - static_cast<T>(2) * zNear;
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> infinitePerspective(T fovy, T aspect, T zNear)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
+ return infinitePerspectiveLH(fovy, aspect, zNear);
+# else
+ return infinitePerspectiveRH(fovy, aspect, zNear);
+# endif
+ }
+
+ // Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear, T ep)
+ {
+ T const range = tan(fovy / static_cast<T>(2)) * zNear;
+ T const left = -range * aspect;
+ T const right = range * aspect;
+ T const bottom = -range;
+ T const top = range;
+
+ mat<4, 4, T, defaultp> Result(static_cast<T>(0));
+ Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
+ Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
+ Result[2][2] = ep - static_cast<T>(1);
+ Result[2][3] = static_cast<T>(-1);
+ Result[3][2] = (ep - static_cast<T>(2)) * zNear;
+ return Result;
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear)
+ {
+ return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>());
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_common.hpp b/src/include/glm/ext/matrix_common.hpp
new file mode 100644
index 0000000..389494d
--- /dev/null
+++ b/src/include/glm/ext/matrix_common.hpp
@@ -0,0 +1,36 @@
+/// @ref ext_matrix_common
+/// @file glm/ext/matrix_common.hpp
+///
+/// @defgroup ext_matrix_common GLM_EXT_matrix_common
+/// @ingroup ext
+///
+/// Defines functions for common matrix operations.
+///
+/// Include <glm/ext/matrix_common.hpp> to use the features of this extension.
+///
+/// @see ext_matrix_common
+
+#pragma once
+
+#include "../detail/qualifier.hpp"
+#include "../detail/_fixes.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_transform extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_common
+ /// @{
+
+ template<length_t C, length_t R, typename T, typename U, qualifier Q>
+ GLM_FUNC_DECL mat<C, R, T, Q> mix(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, mat<C, R, U, Q> const& a);
+
+ template<length_t C, length_t R, typename T, typename U, qualifier Q>
+ GLM_FUNC_DECL mat<C, R, T, Q> mix(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, U a);
+
+ /// @}
+}//namespace glm
+
+#include "matrix_common.inl"
diff --git a/src/include/glm/ext/matrix_common.inl b/src/include/glm/ext/matrix_common.inl
new file mode 100644
index 0000000..53661d7
--- /dev/null
+++ b/src/include/glm/ext/matrix_common.inl
@@ -0,0 +1,16 @@
+#include "../matrix.hpp"
+
+namespace glm
+{
+ template<length_t C, length_t R, typename T, typename U, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<C, R, T, Q> mix(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, U a)
+ {
+ return mat<C, R, U, Q>(x) * (static_cast<U>(1) - a) + mat<C, R, U, Q>(y) * a;
+ }
+
+ template<length_t C, length_t R, typename T, typename U, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<C, R, T, Q> mix(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, mat<C, R, U, Q> const& a)
+ {
+ return matrixCompMult(mat<C, R, U, Q>(x), static_cast<U>(1) - a) + matrixCompMult(mat<C, R, U, Q>(y), a);
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double2x2.hpp b/src/include/glm/ext/matrix_double2x2.hpp
new file mode 100644
index 0000000..89e7ebf
--- /dev/null
+++ b/src/include/glm/ext/matrix_double2x2.hpp
@@ -0,0 +1,23 @@
+/// @ref core
+/// @file glm/ext/matrix_double2x2.hpp
+
+#pragma once
+#include "../detail/type_mat2x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 2 columns of 2 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<2, 2, double, defaultp> dmat2x2;
+
+ /// 2 columns of 2 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<2, 2, double, defaultp> dmat2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double2x2_precision.hpp b/src/include/glm/ext/matrix_double2x2_precision.hpp
new file mode 100644
index 0000000..8886488
--- /dev/null
+++ b/src/include/glm/ext/matrix_double2x2_precision.hpp
@@ -0,0 +1,49 @@
+/// @ref core
+/// @file glm/ext/matrix_double2x2_precision.hpp
+
+#pragma once
+#include "../detail/type_mat2x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 2 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, double, lowp> lowp_dmat2;
+
+ /// 2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, double, mediump> mediump_dmat2;
+
+ /// 2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, double, highp> highp_dmat2;
+
+ /// 2 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, double, lowp> lowp_dmat2x2;
+
+ /// 2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, double, mediump> mediump_dmat2x2;
+
+ /// 2 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, double, highp> highp_dmat2x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double2x3.hpp b/src/include/glm/ext/matrix_double2x3.hpp
new file mode 100644
index 0000000..ae485b2
--- /dev/null
+++ b/src/include/glm/ext/matrix_double2x3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_double2x3.hpp
+
+#pragma once
+#include "../detail/type_mat2x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 2 columns of 3 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<2, 3, double, defaultp> dmat2x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double2x3_precision.hpp b/src/include/glm/ext/matrix_double2x3_precision.hpp
new file mode 100644
index 0000000..0a81269
--- /dev/null
+++ b/src/include/glm/ext/matrix_double2x3_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_double2x3_precision.hpp
+
+#pragma once
+#include "../detail/type_mat2x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 2 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 3, double, lowp> lowp_dmat2x3;
+
+ /// 2 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 3, double, mediump> mediump_dmat2x3;
+
+ /// 2 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 3, double, highp> highp_dmat2x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double2x4.hpp b/src/include/glm/ext/matrix_double2x4.hpp
new file mode 100644
index 0000000..4852048
--- /dev/null
+++ b/src/include/glm/ext/matrix_double2x4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_double2x4.hpp
+
+#pragma once
+#include "../detail/type_mat2x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 2 columns of 4 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<2, 4, double, defaultp> dmat2x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double2x4_precision.hpp b/src/include/glm/ext/matrix_double2x4_precision.hpp
new file mode 100644
index 0000000..1fe933f
--- /dev/null
+++ b/src/include/glm/ext/matrix_double2x4_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_double2x4_precision.hpp
+
+#pragma once
+#include "../detail/type_mat2x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 2 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 4, double, lowp> lowp_dmat2x4;
+
+ /// 2 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 4, double, mediump> mediump_dmat2x4;
+
+ /// 2 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 4, double, highp> highp_dmat2x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double3x2.hpp b/src/include/glm/ext/matrix_double3x2.hpp
new file mode 100644
index 0000000..6b21696
--- /dev/null
+++ b/src/include/glm/ext/matrix_double3x2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_double3x2.hpp
+
+#pragma once
+#include "../detail/type_mat3x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 3 columns of 2 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<3, 2, double, defaultp> dmat3x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double3x2_precision.hpp b/src/include/glm/ext/matrix_double3x2_precision.hpp
new file mode 100644
index 0000000..f1467a1
--- /dev/null
+++ b/src/include/glm/ext/matrix_double3x2_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_double3x2_precision.hpp
+
+#pragma once
+#include "../detail/type_mat3x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 3 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 2, double, lowp> lowp_dmat3x2;
+
+ /// 3 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 2, double, mediump> mediump_dmat3x2;
+
+ /// 3 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 2, double, highp> highp_dmat3x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double3x3.hpp b/src/include/glm/ext/matrix_double3x3.hpp
new file mode 100644
index 0000000..e158913
--- /dev/null
+++ b/src/include/glm/ext/matrix_double3x3.hpp
@@ -0,0 +1,23 @@
+/// @ref core
+/// @file glm/ext/matrix_double3x3.hpp
+
+#pragma once
+#include "../detail/type_mat3x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 3 columns of 3 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<3, 3, double, defaultp> dmat3x3;
+
+ /// 3 columns of 3 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<3, 3, double, defaultp> dmat3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double3x3_precision.hpp b/src/include/glm/ext/matrix_double3x3_precision.hpp
new file mode 100644
index 0000000..e487cc2
--- /dev/null
+++ b/src/include/glm/ext/matrix_double3x3_precision.hpp
@@ -0,0 +1,49 @@
+/// @ref core
+/// @file glm/ext/matrix_double3x3_precision.hpp
+
+#pragma once
+#include "../detail/type_mat3x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 3 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, double, lowp> lowp_dmat3;
+
+ /// 3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, double, mediump> mediump_dmat3;
+
+ /// 3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, double, highp> highp_dmat3;
+
+ /// 3 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, double, lowp> lowp_dmat3x3;
+
+ /// 3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, double, mediump> mediump_dmat3x3;
+
+ /// 3 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, double, highp> highp_dmat3x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double3x4.hpp b/src/include/glm/ext/matrix_double3x4.hpp
new file mode 100644
index 0000000..d5f15ac
--- /dev/null
+++ b/src/include/glm/ext/matrix_double3x4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_double3x4.hpp
+
+#pragma once
+#include "../detail/type_mat3x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 3 columns of 4 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<3, 4, double, defaultp> dmat3x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double3x4_precision.hpp b/src/include/glm/ext/matrix_double3x4_precision.hpp
new file mode 100644
index 0000000..b7c21b0
--- /dev/null
+++ b/src/include/glm/ext/matrix_double3x4_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_double3x4_precision.hpp
+
+#pragma once
+#include "../detail/type_mat3x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 3 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 4, double, lowp> lowp_dmat3x4;
+
+ /// 3 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 4, double, mediump> mediump_dmat3x4;
+
+ /// 3 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 4, double, highp> highp_dmat3x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double4x2.hpp b/src/include/glm/ext/matrix_double4x2.hpp
new file mode 100644
index 0000000..8cfa015
--- /dev/null
+++ b/src/include/glm/ext/matrix_double4x2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_double4x2.hpp
+
+#pragma once
+#include "../detail/type_mat4x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 4 columns of 2 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<4, 2, double, defaultp> dmat4x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double4x2_precision.hpp b/src/include/glm/ext/matrix_double4x2_precision.hpp
new file mode 100644
index 0000000..0d5f7c3
--- /dev/null
+++ b/src/include/glm/ext/matrix_double4x2_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_double4x2_precision.hpp
+
+#pragma once
+#include "../detail/type_mat4x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 4 columns of 2 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 2, double, lowp> lowp_dmat4x2;
+
+ /// 4 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 2, double, mediump> mediump_dmat4x2;
+
+ /// 4 columns of 2 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 2, double, highp> highp_dmat4x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double4x3.hpp b/src/include/glm/ext/matrix_double4x3.hpp
new file mode 100644
index 0000000..60c1510
--- /dev/null
+++ b/src/include/glm/ext/matrix_double4x3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_double4x3.hpp
+
+#pragma once
+#include "../detail/type_mat4x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 4 columns of 3 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<4, 3, double, defaultp> dmat4x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double4x3_precision.hpp b/src/include/glm/ext/matrix_double4x3_precision.hpp
new file mode 100644
index 0000000..66f4455
--- /dev/null
+++ b/src/include/glm/ext/matrix_double4x3_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_double4x3_precision.hpp
+
+#pragma once
+#include "../detail/type_mat4x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 4 columns of 3 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 3, double, lowp> lowp_dmat4x3;
+
+ /// 4 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 3, double, mediump> mediump_dmat4x3;
+
+ /// 4 columns of 3 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 3, double, highp> highp_dmat4x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double4x4.hpp b/src/include/glm/ext/matrix_double4x4.hpp
new file mode 100644
index 0000000..513bfec
--- /dev/null
+++ b/src/include/glm/ext/matrix_double4x4.hpp
@@ -0,0 +1,23 @@
+/// @ref core
+/// @file glm/ext/matrix_double4x4.hpp
+
+#pragma once
+#include "../detail/type_mat4x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 4 columns of 4 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<4, 4, double, defaultp> dmat4x4;
+
+ /// 4 columns of 4 components matrix of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<4, 4, double, defaultp> dmat4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_double4x4_precision.hpp b/src/include/glm/ext/matrix_double4x4_precision.hpp
new file mode 100644
index 0000000..1e46ff7
--- /dev/null
+++ b/src/include/glm/ext/matrix_double4x4_precision.hpp
@@ -0,0 +1,49 @@
+/// @ref core
+/// @file glm/ext/matrix_double4x4_precision.hpp
+
+#pragma once
+#include "../detail/type_mat4x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 4 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, double, lowp> lowp_dmat4;
+
+ /// 4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, double, mediump> mediump_dmat4;
+
+ /// 4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, double, highp> highp_dmat4;
+
+ /// 4 columns of 4 components matrix of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, double, lowp> lowp_dmat4x4;
+
+ /// 4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, double, mediump> mediump_dmat4x4;
+
+ /// 4 columns of 4 components matrix of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, double, highp> highp_dmat4x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float2x2.hpp b/src/include/glm/ext/matrix_float2x2.hpp
new file mode 100644
index 0000000..8b7478a
--- /dev/null
+++ b/src/include/glm/ext/matrix_float2x2.hpp
@@ -0,0 +1,23 @@
+/// @ref core
+/// @file glm/ext/matrix_float2x2.hpp
+
+#pragma once
+#include "../detail/type_mat2x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 2 columns of 2 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<2, 2, float, defaultp> mat2x2;
+
+ /// 2 columns of 2 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<2, 2, float, defaultp> mat2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float2x2_precision.hpp b/src/include/glm/ext/matrix_float2x2_precision.hpp
new file mode 100644
index 0000000..5990a48
--- /dev/null
+++ b/src/include/glm/ext/matrix_float2x2_precision.hpp
@@ -0,0 +1,49 @@
+/// @ref core
+/// @file glm/ext/matrix_float2x2_precision.hpp
+
+#pragma once
+#include "../detail/type_mat2x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 2 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, float, lowp> lowp_mat2;
+
+ /// 2 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, float, mediump> mediump_mat2;
+
+ /// 2 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, float, highp> highp_mat2;
+
+ /// 2 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, float, lowp> lowp_mat2x2;
+
+ /// 2 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, float, mediump> mediump_mat2x2;
+
+ /// 2 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 2, float, highp> highp_mat2x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float2x3.hpp b/src/include/glm/ext/matrix_float2x3.hpp
new file mode 100644
index 0000000..145b216
--- /dev/null
+++ b/src/include/glm/ext/matrix_float2x3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_float2x3.hpp
+
+#pragma once
+#include "../detail/type_mat2x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 2 columns of 3 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<2, 3, float, defaultp> mat2x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float2x3_precision.hpp b/src/include/glm/ext/matrix_float2x3_precision.hpp
new file mode 100644
index 0000000..49ad0cc
--- /dev/null
+++ b/src/include/glm/ext/matrix_float2x3_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_float2x3_precision.hpp
+
+#pragma once
+#include "../detail/type_mat2x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 2 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 3, float, lowp> lowp_mat2x3;
+
+ /// 2 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 3, float, mediump> mediump_mat2x3;
+
+ /// 2 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 3, float, highp> highp_mat2x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float2x4.hpp b/src/include/glm/ext/matrix_float2x4.hpp
new file mode 100644
index 0000000..bd0f2b4
--- /dev/null
+++ b/src/include/glm/ext/matrix_float2x4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_float2x4.hpp
+
+#pragma once
+#include "../detail/type_mat2x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 2 columns of 4 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<2, 4, float, defaultp> mat2x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float2x4_precision.hpp b/src/include/glm/ext/matrix_float2x4_precision.hpp
new file mode 100644
index 0000000..161a0cf
--- /dev/null
+++ b/src/include/glm/ext/matrix_float2x4_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_float2x4_precision.hpp
+
+#pragma once
+#include "../detail/type_mat2x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 2 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 4, float, lowp> lowp_mat2x4;
+
+ /// 2 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 4, float, mediump> mediump_mat2x4;
+
+ /// 2 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<2, 4, float, highp> highp_mat2x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float3x2.hpp b/src/include/glm/ext/matrix_float3x2.hpp
new file mode 100644
index 0000000..4a212d8
--- /dev/null
+++ b/src/include/glm/ext/matrix_float3x2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_float3x2.hpp
+
+#pragma once
+#include "../detail/type_mat3x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core
+ /// @{
+
+ /// 3 columns of 2 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<3, 2, float, defaultp> mat3x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float3x2_precision.hpp b/src/include/glm/ext/matrix_float3x2_precision.hpp
new file mode 100644
index 0000000..d0b7d00
--- /dev/null
+++ b/src/include/glm/ext/matrix_float3x2_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_float3x2_precision.hpp
+
+#pragma once
+#include "../detail/type_mat3x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 3 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 2, float, lowp> lowp_mat3x2;
+
+ /// 3 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 2, float, mediump> mediump_mat3x2;
+
+ /// 3 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 2, float, highp> highp_mat3x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float3x3.hpp b/src/include/glm/ext/matrix_float3x3.hpp
new file mode 100644
index 0000000..9abaa60
--- /dev/null
+++ b/src/include/glm/ext/matrix_float3x3.hpp
@@ -0,0 +1,23 @@
+/// @ref core
+/// @file glm/ext/matrix_float3x3.hpp
+
+#pragma once
+#include "../detail/type_mat3x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 3 columns of 3 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<3, 3, float, defaultp> mat3x3;
+
+ /// 3 columns of 3 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<3, 3, float, defaultp> mat3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float3x3_precision.hpp b/src/include/glm/ext/matrix_float3x3_precision.hpp
new file mode 100644
index 0000000..e66345d
--- /dev/null
+++ b/src/include/glm/ext/matrix_float3x3_precision.hpp
@@ -0,0 +1,49 @@
+/// @ref core
+/// @file glm/ext/matrix_float3x3_precision.hpp
+
+#pragma once
+#include "../detail/type_mat3x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 3 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, float, lowp> lowp_mat3;
+
+ /// 3 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, float, mediump> mediump_mat3;
+
+ /// 3 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, float, highp> highp_mat3;
+
+ /// 3 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, float, lowp> lowp_mat3x3;
+
+ /// 3 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, float, mediump> mediump_mat3x3;
+
+ /// 3 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 3, float, highp> highp_mat3x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float3x4.hpp b/src/include/glm/ext/matrix_float3x4.hpp
new file mode 100644
index 0000000..95b7b4b
--- /dev/null
+++ b/src/include/glm/ext/matrix_float3x4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_float3x4.hpp
+
+#pragma once
+#include "../detail/type_mat3x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 3 columns of 4 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<3, 4, float, defaultp> mat3x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float3x4_precision.hpp b/src/include/glm/ext/matrix_float3x4_precision.hpp
new file mode 100644
index 0000000..a0e7033
--- /dev/null
+++ b/src/include/glm/ext/matrix_float3x4_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_float3x4_precision.hpp
+
+#pragma once
+#include "../detail/type_mat3x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 3 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 4, float, lowp> lowp_mat3x4;
+
+ /// 3 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 4, float, mediump> mediump_mat3x4;
+
+ /// 3 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<3, 4, float, highp> highp_mat3x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float4x2.hpp b/src/include/glm/ext/matrix_float4x2.hpp
new file mode 100644
index 0000000..b5a34f2
--- /dev/null
+++ b/src/include/glm/ext/matrix_float4x2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_float4x2.hpp
+
+#pragma once
+#include "../detail/type_mat4x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 4 columns of 2 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<4, 2, float, defaultp> mat4x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float4x2_precision.hpp b/src/include/glm/ext/matrix_float4x2_precision.hpp
new file mode 100644
index 0000000..f3e91bb
--- /dev/null
+++ b/src/include/glm/ext/matrix_float4x2_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_float2x2_precision.hpp
+
+#pragma once
+#include "../detail/type_mat2x2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 4 columns of 2 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 2, float, lowp> lowp_mat4x2;
+
+ /// 4 columns of 2 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 2, float, mediump> mediump_mat4x2;
+
+ /// 4 columns of 2 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 2, float, highp> highp_mat4x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float4x3.hpp b/src/include/glm/ext/matrix_float4x3.hpp
new file mode 100644
index 0000000..084a7eb
--- /dev/null
+++ b/src/include/glm/ext/matrix_float4x3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/matrix_float4x3.hpp
+
+#pragma once
+#include "../detail/type_mat4x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix
+ /// @{
+
+ /// 4 columns of 3 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<4, 3, float, defaultp> mat4x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float4x3_precision.hpp b/src/include/glm/ext/matrix_float4x3_precision.hpp
new file mode 100644
index 0000000..f0e7c27
--- /dev/null
+++ b/src/include/glm/ext/matrix_float4x3_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/matrix_float4x3_precision.hpp
+
+#pragma once
+#include "../detail/type_mat4x3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 4 columns of 3 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 3, float, lowp> lowp_mat4x3;
+
+ /// 4 columns of 3 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 3, float, mediump> mediump_mat4x3;
+
+ /// 4 columns of 3 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 3, float, highp> highp_mat4x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float4x4.hpp b/src/include/glm/ext/matrix_float4x4.hpp
new file mode 100644
index 0000000..f5b08cf
--- /dev/null
+++ b/src/include/glm/ext/matrix_float4x4.hpp
@@ -0,0 +1,23 @@
+/// @ref core
+/// @file glm/ext/matrix_float4x4.hpp
+
+#pragma once
+#include "../detail/type_mat4x4.hpp"
+
+namespace glm
+{
+ /// @ingroup core_matrix
+ /// @{
+
+ /// 4 columns of 4 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<4, 4, float, defaultp> mat4x4;
+
+ /// 4 columns of 4 components matrix of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ typedef mat<4, 4, float, defaultp> mat4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_float4x4_precision.hpp b/src/include/glm/ext/matrix_float4x4_precision.hpp
new file mode 100644
index 0000000..9faf124
--- /dev/null
+++ b/src/include/glm/ext/matrix_float4x4_precision.hpp
@@ -0,0 +1,49 @@
+/// @ref core
+/// @file glm/ext/matrix_float4x4_precision.hpp
+
+#pragma once
+#include "../detail/type_mat4x4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_matrix_precision
+ /// @{
+
+ /// 4 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, float, lowp> lowp_mat4;
+
+ /// 4 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, float, mediump> mediump_mat4;
+
+ /// 4 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, float, highp> highp_mat4;
+
+ /// 4 columns of 4 components matrix of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, float, lowp> lowp_mat4x4;
+
+ /// 4 columns of 4 components matrix of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, float, mediump> mediump_mat4x4;
+
+ /// 4 columns of 4 components matrix of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef mat<4, 4, float, highp> highp_mat4x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int2x2.hpp b/src/include/glm/ext/matrix_int2x2.hpp
new file mode 100644
index 0000000..e8d346a
--- /dev/null
+++ b/src/include/glm/ext/matrix_int2x2.hpp
@@ -0,0 +1,38 @@
+/// @ref ext_matrix_int2x2
+/// @file glm/ext/matrix_int2x2.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int2x2 GLM_EXT_matrix_int2x2
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int2x2.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x2.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int2x2 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int2x2
+ /// @{
+
+ /// Signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2
+ typedef mat<2, 2, int, defaultp> imat2x2;
+
+ /// Signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2
+ typedef mat<2, 2, int, defaultp> imat2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int2x2_sized.hpp b/src/include/glm/ext/matrix_int2x2_sized.hpp
new file mode 100644
index 0000000..56db06d
--- /dev/null
+++ b/src/include/glm/ext/matrix_int2x2_sized.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_matrix_int2x2_sized
+/// @file glm/ext/matrix_int2x2_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int2x2_sized GLM_EXT_matrix_int2x2_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int2x2_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x2.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int2x2_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int2x2_sized
+ /// @{
+
+ /// 8 bit signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2_sized
+ typedef mat<2, 2, int8, defaultp> i8mat2x2;
+
+ /// 16 bit signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2_sized
+ typedef mat<2, 2, int16, defaultp> i16mat2x2;
+
+ /// 32 bit signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2_sized
+ typedef mat<2, 2, int32, defaultp> i32mat2x2;
+
+ /// 64 bit signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2_sized
+ typedef mat<2, 2, int64, defaultp> i64mat2x2;
+
+
+ /// 8 bit signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2_sized
+ typedef mat<2, 2, int8, defaultp> i8mat2;
+
+ /// 16 bit signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2_sized
+ typedef mat<2, 2, int16, defaultp> i16mat2;
+
+ /// 32 bit signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2_sized
+ typedef mat<2, 2, int32, defaultp> i32mat2;
+
+ /// 64 bit signed integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_int2x2_sized
+ typedef mat<2, 2, int64, defaultp> i64mat2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int2x3.hpp b/src/include/glm/ext/matrix_int2x3.hpp
new file mode 100644
index 0000000..e9ec6de
--- /dev/null
+++ b/src/include/glm/ext/matrix_int2x3.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_int2x3
+/// @file glm/ext/matrix_int2x3.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int2x3 GLM_EXT_matrix_int2x3
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int2x3.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x3.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int2x3 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int2x3
+ /// @{
+
+ /// Signed integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_int2x3
+ typedef mat<2, 3, int, defaultp> imat2x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int2x3_sized.hpp b/src/include/glm/ext/matrix_int2x3_sized.hpp
new file mode 100644
index 0000000..66f7c3a
--- /dev/null
+++ b/src/include/glm/ext/matrix_int2x3_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_int2x3_sized
+/// @file glm/ext/matrix_int2x3_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int2x3_sized GLM_EXT_matrix_int2x3_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int2x3_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x3.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int2x3_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int2x3_sized
+ /// @{
+
+ /// 8 bit signed integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_int2x3_sized
+ typedef mat<2, 3, int8, defaultp> i8mat2x3;
+
+ /// 16 bit signed integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_int2x3_sized
+ typedef mat<2, 3, int16, defaultp> i16mat2x3;
+
+ /// 32 bit signed integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_int2x3_sized
+ typedef mat<2, 3, int32, defaultp> i32mat2x3;
+
+ /// 64 bit signed integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_int2x3_sized
+ typedef mat<2, 3, int64, defaultp> i64mat2x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int2x4.hpp b/src/include/glm/ext/matrix_int2x4.hpp
new file mode 100644
index 0000000..309b3ea
--- /dev/null
+++ b/src/include/glm/ext/matrix_int2x4.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_int2x4
+/// @file glm/ext/matrix_int2x4.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int2x4 GLM_EXT_matrix_int2x4
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int2x4.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x4.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int2x4 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int2x4
+ /// @{
+
+ /// Signed integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_int2x4
+ typedef mat<2, 4, int, defaultp> imat2x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int2x4_sized.hpp b/src/include/glm/ext/matrix_int2x4_sized.hpp
new file mode 100644
index 0000000..ae3298c
--- /dev/null
+++ b/src/include/glm/ext/matrix_int2x4_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_int2x4_sized
+/// @file glm/ext/matrix_int2x4_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int2x4_sized GLM_EXT_matrix_int2x4_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int2x4_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x4.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int2x4_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int2x4_sized
+ /// @{
+
+ /// 8 bit signed integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_int2x4_sized
+ typedef mat<2, 4, int8, defaultp> i8mat2x4;
+
+ /// 16 bit signed integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_int2x4_sized
+ typedef mat<2, 4, int16, defaultp> i16mat2x4;
+
+ /// 32 bit signed integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_int2x4_sized
+ typedef mat<2, 4, int32, defaultp> i32mat2x4;
+
+ /// 64 bit signed integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_int2x4_sized
+ typedef mat<2, 4, int64, defaultp> i64mat2x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int3x2.hpp b/src/include/glm/ext/matrix_int3x2.hpp
new file mode 100644
index 0000000..24ed22e
--- /dev/null
+++ b/src/include/glm/ext/matrix_int3x2.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_int3x2
+/// @file glm/ext/matrix_int3x2.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int3x2 GLM_EXT_matrix_int3x2
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int3x2.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x2.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int3x2 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int3x2
+ /// @{
+
+ /// Signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_int3x2
+ typedef mat<3, 2, int, defaultp> imat3x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int3x2_sized.hpp b/src/include/glm/ext/matrix_int3x2_sized.hpp
new file mode 100644
index 0000000..34888bc
--- /dev/null
+++ b/src/include/glm/ext/matrix_int3x2_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_int3x2_sized
+/// @file glm/ext/matrix_int3x2_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int3x2_sized GLM_EXT_matrix_int3x2_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int3x2_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x2.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int3x2_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int3x2_sized
+ /// @{
+
+ /// 8 bit signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_int3x2_sized
+ typedef mat<3, 2, int8, defaultp> i8mat3x2;
+
+ /// 16 bit signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_int3x2_sized
+ typedef mat<3, 2, int16, defaultp> i16mat3x2;
+
+ /// 32 bit signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_int3x2_sized
+ typedef mat<3, 2, int32, defaultp> i32mat3x2;
+
+ /// 64 bit signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_int3x2_sized
+ typedef mat<3, 2, int64, defaultp> i64mat3x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int3x3.hpp b/src/include/glm/ext/matrix_int3x3.hpp
new file mode 100644
index 0000000..11327b7
--- /dev/null
+++ b/src/include/glm/ext/matrix_int3x3.hpp
@@ -0,0 +1,38 @@
+/// @ref ext_matrix_int3x3
+/// @file glm/ext/matrix_int3x3.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int3x3 GLM_EXT_matrix_int3x3
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int3x3.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x3.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int3x3 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int3x3
+ /// @{
+
+ /// Signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3
+ typedef mat<3, 3, int, defaultp> imat3x3;
+
+ /// Signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3
+ typedef mat<3, 3, int, defaultp> imat3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int3x3_sized.hpp b/src/include/glm/ext/matrix_int3x3_sized.hpp
new file mode 100644
index 0000000..38048bd
--- /dev/null
+++ b/src/include/glm/ext/matrix_int3x3_sized.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_matrix_int3x3_sized
+/// @file glm/ext/matrix_int3x3_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int3x3_sized GLM_EXT_matrix_int3x3_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int3x3_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x3.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int3x3_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int3x3_sized
+ /// @{
+
+ /// 8 bit signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3_sized
+ typedef mat<3, 3, int8, defaultp> i8mat3x3;
+
+ /// 16 bit signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3_sized
+ typedef mat<3, 3, int16, defaultp> i16mat3x3;
+
+ /// 32 bit signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3_sized
+ typedef mat<3, 3, int32, defaultp> i32mat3x3;
+
+ /// 64 bit signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3_sized
+ typedef mat<3, 3, int64, defaultp> i64mat3x3;
+
+
+ /// 8 bit signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3_sized
+ typedef mat<3, 3, int8, defaultp> i8mat3;
+
+ /// 16 bit signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3_sized
+ typedef mat<3, 3, int16, defaultp> i16mat3;
+
+ /// 32 bit signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3_sized
+ typedef mat<3, 3, int32, defaultp> i32mat3;
+
+ /// 64 bit signed integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_int3x3_sized
+ typedef mat<3, 3, int64, defaultp> i64mat3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int3x4.hpp b/src/include/glm/ext/matrix_int3x4.hpp
new file mode 100644
index 0000000..a784279
--- /dev/null
+++ b/src/include/glm/ext/matrix_int3x4.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_int3x4
+/// @file glm/ext/matrix_int3x4.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int3x4 GLM_EXT_matrix_int3x4
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int3x4.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x4.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int3x4 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int3x4
+ /// @{
+
+ /// Signed integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_int3x4
+ typedef mat<3, 4, int, defaultp> imat3x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int3x4_sized.hpp b/src/include/glm/ext/matrix_int3x4_sized.hpp
new file mode 100644
index 0000000..b79b037
--- /dev/null
+++ b/src/include/glm/ext/matrix_int3x4_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_int3x4_sized
+/// @file glm/ext/matrix_int3x2_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int3x4_sized GLM_EXT_matrix_int3x4_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int3x4_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x4.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int3x4_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int3x4_sized
+ /// @{
+
+ /// 8 bit signed integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_int3x4_sized
+ typedef mat<3, 4, int8, defaultp> i8mat3x4;
+
+ /// 16 bit signed integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_int3x4_sized
+ typedef mat<3, 4, int16, defaultp> i16mat3x4;
+
+ /// 32 bit signed integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_int3x4_sized
+ typedef mat<3, 4, int32, defaultp> i32mat3x4;
+
+ /// 64 bit signed integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_int3x4_sized
+ typedef mat<3, 4, int64, defaultp> i64mat3x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int4x2.hpp b/src/include/glm/ext/matrix_int4x2.hpp
new file mode 100644
index 0000000..897322d
--- /dev/null
+++ b/src/include/glm/ext/matrix_int4x2.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_int4x2
+/// @file glm/ext/matrix_int4x2.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int4x2 GLM_EXT_matrix_int4x2
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int4x2.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x2.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int4x2 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int4x2
+ /// @{
+
+ /// Signed integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_int4x2
+ typedef mat<4, 2, int, defaultp> imat4x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int4x2_sized.hpp b/src/include/glm/ext/matrix_int4x2_sized.hpp
new file mode 100644
index 0000000..322e4e5
--- /dev/null
+++ b/src/include/glm/ext/matrix_int4x2_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_int4x2_sized
+/// @file glm/ext/matrix_int4x2_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int4x2_sized GLM_EXT_matrix_int4x2_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int4x2_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x2.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int4x2_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int4x2_sized
+ /// @{
+
+ /// 8 bit signed integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_int4x2_sized
+ typedef mat<4, 2, int8, defaultp> i8mat4x2;
+
+ /// 16 bit signed integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_int4x2_sized
+ typedef mat<4, 2, int16, defaultp> i16mat4x2;
+
+ /// 32 bit signed integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_int4x2_sized
+ typedef mat<4, 2, int32, defaultp> i32mat4x2;
+
+ /// 64 bit signed integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_int4x2_sized
+ typedef mat<4, 2, int64, defaultp> i64mat4x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int4x3.hpp b/src/include/glm/ext/matrix_int4x3.hpp
new file mode 100644
index 0000000..c14a663
--- /dev/null
+++ b/src/include/glm/ext/matrix_int4x3.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_int4x3
+/// @file glm/ext/matrix_int4x3.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int4x3 GLM_EXT_matrix_int4x3
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int4x3.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x3.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int4x3 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int4x3
+ /// @{
+
+ /// Signed integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_int4x3
+ typedef mat<4, 3, int, defaultp> imat4x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int4x3_sized.hpp b/src/include/glm/ext/matrix_int4x3_sized.hpp
new file mode 100644
index 0000000..1bd1e51
--- /dev/null
+++ b/src/include/glm/ext/matrix_int4x3_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_int4x3_sized
+/// @file glm/ext/matrix_int4x3_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int4x3_sized GLM_EXT_matrix_int4x3_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int4x3_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x3.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int4x3_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int4x3_sized
+ /// @{
+
+ /// 8 bit signed integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_int4x3_sized
+ typedef mat<4, 3, int8, defaultp> i8mat4x3;
+
+ /// 16 bit signed integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_int4x3_sized
+ typedef mat<4, 3, int16, defaultp> i16mat4x3;
+
+ /// 32 bit signed integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_int4x3_sized
+ typedef mat<4, 3, int32, defaultp> i32mat4x3;
+
+ /// 64 bit signed integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_int4x3_sized
+ typedef mat<4, 3, int64, defaultp> i64mat4x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int4x4.hpp b/src/include/glm/ext/matrix_int4x4.hpp
new file mode 100644
index 0000000..6daf759
--- /dev/null
+++ b/src/include/glm/ext/matrix_int4x4.hpp
@@ -0,0 +1,38 @@
+/// @ref ext_matrix_int4x4
+/// @file glm/ext/matrix_int4x4.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int4x4 GLM_EXT_matrix_int4x4
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int4x4.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x4.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int4x4 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int4x4
+ /// @{
+
+ /// Signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4
+ typedef mat<4, 4, int, defaultp> imat4x4;
+
+ /// Signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4
+ typedef mat<4, 4, int, defaultp> imat4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_int4x4_sized.hpp b/src/include/glm/ext/matrix_int4x4_sized.hpp
new file mode 100644
index 0000000..1e553b8
--- /dev/null
+++ b/src/include/glm/ext/matrix_int4x4_sized.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_matrix_int4x4_sized
+/// @file glm/ext/matrix_int4x4_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int4x4_sized GLM_EXT_matrix_int4x4_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_int4x4_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x4.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_int4x4_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_int4x4_sized
+ /// @{
+
+ /// 8 bit signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4_sized
+ typedef mat<4, 4, int8, defaultp> i8mat4x4;
+
+ /// 16 bit signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4_sized
+ typedef mat<4, 4, int16, defaultp> i16mat4x4;
+
+ /// 32 bit signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4_sized
+ typedef mat<4, 4, int32, defaultp> i32mat4x4;
+
+ /// 64 bit signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4_sized
+ typedef mat<4, 4, int64, defaultp> i64mat4x4;
+
+
+ /// 8 bit signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4_sized
+ typedef mat<4, 4, int8, defaultp> i8mat4;
+
+ /// 16 bit signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4_sized
+ typedef mat<4, 4, int16, defaultp> i16mat4;
+
+ /// 32 bit signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4_sized
+ typedef mat<4, 4, int32, defaultp> i32mat4;
+
+ /// 64 bit signed integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_int4x4_sized
+ typedef mat<4, 4, int64, defaultp> i64mat4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_projection.hpp b/src/include/glm/ext/matrix_projection.hpp
new file mode 100644
index 0000000..4c2a494
--- /dev/null
+++ b/src/include/glm/ext/matrix_projection.hpp
@@ -0,0 +1,149 @@
+/// @ref ext_matrix_projection
+/// @file glm/ext/matrix_projection.hpp
+///
+/// @defgroup ext_matrix_projection GLM_EXT_matrix_projection
+/// @ingroup ext
+///
+/// Functions that generate common projection transformation matrices.
+///
+/// The matrices generated by this extension use standard OpenGL fixed-function
+/// conventions. For example, the lookAt function generates a transform from world
+/// space into the specific eye space that the projective matrix functions
+/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility
+/// specifications defines the particular layout of this eye space.
+///
+/// Include <glm/ext/matrix_projection.hpp> to use the features of this extension.
+///
+/// @see ext_matrix_transform
+/// @see ext_matrix_clip_space
+
+#pragma once
+
+// Dependencies
+#include "../gtc/constants.hpp"
+#include "../geometric.hpp"
+#include "../trigonometric.hpp"
+#include "../matrix.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_projection extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_projection
+ /// @{
+
+ /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @param obj Specify the object coordinates.
+ /// @param model Specifies the current modelview matrix
+ /// @param proj Specifies the current projection matrix
+ /// @param viewport Specifies the current viewport
+ /// @return Return the computed window coordinates.
+ /// @tparam T Native type used for the computation. Currently supported: half (not recommended), float or double.
+ /// @tparam U Currently supported: Floating-point types and integer types.
+ ///
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a>
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_DECL vec<3, T, Q> projectZO(
+ vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
+
+ /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param obj Specify the object coordinates.
+ /// @param model Specifies the current modelview matrix
+ /// @param proj Specifies the current projection matrix
+ /// @param viewport Specifies the current viewport
+ /// @return Return the computed window coordinates.
+ /// @tparam T Native type used for the computation. Currently supported: half (not recommended), float or double.
+ /// @tparam U Currently supported: Floating-point types and integer types.
+ ///
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a>
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_DECL vec<3, T, Q> projectNO(
+ vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
+
+ /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates using default near and far clip planes definition.
+ /// To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
+ ///
+ /// @param obj Specify the object coordinates.
+ /// @param model Specifies the current modelview matrix
+ /// @param proj Specifies the current projection matrix
+ /// @param viewport Specifies the current viewport
+ /// @return Return the computed window coordinates.
+ /// @tparam T Native type used for the computation. Currently supported: half (not recommended), float or double.
+ /// @tparam U Currently supported: Floating-point types and integer types.
+ ///
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">gluProject man page</a>
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_DECL vec<3, T, Q> project(
+ vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
+
+ /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of 0 and +1 respectively. (Direct3D clip volume definition)
+ ///
+ /// @param win Specify the window coordinates to be mapped.
+ /// @param model Specifies the modelview matrix
+ /// @param proj Specifies the projection matrix
+ /// @param viewport Specifies the viewport
+ /// @return Returns the computed object coordinates.
+ /// @tparam T Native type used for the computation. Currently supported: half (not recommended), float or double.
+ /// @tparam U Currently supported: Floating-point types and integer types.
+ ///
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a>
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_DECL vec<3, T, Q> unProjectZO(
+ vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
+
+ /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
+ /// The near and far clip planes correspond to z normalized device coordinates of -1 and +1 respectively. (OpenGL clip volume definition)
+ ///
+ /// @param win Specify the window coordinates to be mapped.
+ /// @param model Specifies the modelview matrix
+ /// @param proj Specifies the projection matrix
+ /// @param viewport Specifies the viewport
+ /// @return Returns the computed object coordinates.
+ /// @tparam T Native type used for the computation. Currently supported: half (not recommended), float or double.
+ /// @tparam U Currently supported: Floating-point types and integer types.
+ ///
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a>
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_DECL vec<3, T, Q> unProjectNO(
+ vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
+
+ /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates using default near and far clip planes definition.
+ /// To change default near and far clip planes definition use GLM_FORCE_DEPTH_ZERO_TO_ONE.
+ ///
+ /// @param win Specify the window coordinates to be mapped.
+ /// @param model Specifies the modelview matrix
+ /// @param proj Specifies the projection matrix
+ /// @param viewport Specifies the viewport
+ /// @return Returns the computed object coordinates.
+ /// @tparam T Native type used for the computation. Currently supported: half (not recommended), float or double.
+ /// @tparam U Currently supported: Floating-point types and integer types.
+ ///
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">gluUnProject man page</a>
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_DECL vec<3, T, Q> unProject(
+ vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
+
+ /// Define a picking region
+ ///
+ /// @param center Specify the center of a picking region in window coordinates.
+ /// @param delta Specify the width and height, respectively, of the picking region in window coordinates.
+ /// @param viewport Rendering viewport
+ /// @tparam T Native type used for the computation. Currently supported: half (not recommended), float or double.
+ /// @tparam U Currently supported: Floating-point types and integer types.
+ ///
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPickMatrix.xml">gluPickMatrix man page</a>
+ template<typename T, qualifier Q, typename U>
+ GLM_FUNC_DECL mat<4, 4, T, Q> pickMatrix(
+ vec<2, T, Q> const& center, vec<2, T, Q> const& delta, vec<4, U, Q> const& viewport);
+
+ /// @}
+}//namespace glm
+
+#include "matrix_projection.inl"
diff --git a/src/include/glm/ext/matrix_projection.inl b/src/include/glm/ext/matrix_projection.inl
new file mode 100644
index 0000000..af8c8f2
--- /dev/null
+++ b/src/include/glm/ext/matrix_projection.inl
@@ -0,0 +1,106 @@
+namespace glm
+{
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> projectZO(vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport)
+ {
+ vec<4, T, Q> tmp = vec<4, T, Q>(obj, static_cast<T>(1));
+ tmp = model * tmp;
+ tmp = proj * tmp;
+
+ tmp /= tmp.w;
+ tmp.x = tmp.x * static_cast<T>(0.5) + static_cast<T>(0.5);
+ tmp.y = tmp.y * static_cast<T>(0.5) + static_cast<T>(0.5);
+
+ tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);
+ tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);
+
+ return vec<3, T, Q>(tmp);
+ }
+
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> projectNO(vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport)
+ {
+ vec<4, T, Q> tmp = vec<4, T, Q>(obj, static_cast<T>(1));
+ tmp = model * tmp;
+ tmp = proj * tmp;
+
+ tmp /= tmp.w;
+ tmp = tmp * static_cast<T>(0.5) + static_cast<T>(0.5);
+ tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);
+ tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);
+
+ return vec<3, T, Q>(tmp);
+ }
+
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> project(vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return projectZO(obj, model, proj, viewport);
+# else
+ return projectNO(obj, model, proj, viewport);
+# endif
+ }
+
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> unProjectZO(vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport)
+ {
+ mat<4, 4, T, Q> Inverse = inverse(proj * model);
+
+ vec<4, T, Q> tmp = vec<4, T, Q>(win, T(1));
+ tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
+ tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);
+ tmp.x = tmp.x * static_cast<T>(2) - static_cast<T>(1);
+ tmp.y = tmp.y * static_cast<T>(2) - static_cast<T>(1);
+
+ vec<4, T, Q> obj = Inverse * tmp;
+ obj /= obj.w;
+
+ return vec<3, T, Q>(obj);
+ }
+
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> unProjectNO(vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport)
+ {
+ mat<4, 4, T, Q> Inverse = inverse(proj * model);
+
+ vec<4, T, Q> tmp = vec<4, T, Q>(win, T(1));
+ tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
+ tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);
+ tmp = tmp * static_cast<T>(2) - static_cast<T>(1);
+
+ vec<4, T, Q> obj = Inverse * tmp;
+ obj /= obj.w;
+
+ return vec<3, T, Q>(obj);
+ }
+
+ template<typename T, typename U, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> unProject(vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport)
+ {
+# if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
+ return unProjectZO(win, model, proj, viewport);
+# else
+ return unProjectNO(win, model, proj, viewport);
+# endif
+ }
+
+ template<typename T, qualifier Q, typename U>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> pickMatrix(vec<2, T, Q> const& center, vec<2, T, Q> const& delta, vec<4, U, Q> const& viewport)
+ {
+ assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0));
+ mat<4, 4, T, Q> Result(static_cast<T>(1));
+
+ if(!(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0)))
+ return Result; // Error
+
+ vec<3, T, Q> Temp(
+ (static_cast<T>(viewport[2]) - static_cast<T>(2) * (center.x - static_cast<T>(viewport[0]))) / delta.x,
+ (static_cast<T>(viewport[3]) - static_cast<T>(2) * (center.y - static_cast<T>(viewport[1]))) / delta.y,
+ static_cast<T>(0));
+
+ // Translate and scale the picked region to the entire window
+ Result = translate(Result, Temp);
+ return scale(Result, vec<3, T, Q>(static_cast<T>(viewport[2]) / delta.x, static_cast<T>(viewport[3]) / delta.y, static_cast<T>(1)));
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_relational.hpp b/src/include/glm/ext/matrix_relational.hpp
new file mode 100644
index 0000000..49d53f8
--- /dev/null
+++ b/src/include/glm/ext/matrix_relational.hpp
@@ -0,0 +1,132 @@
+/// @ref ext_matrix_relational
+/// @file glm/ext/matrix_relational.hpp
+///
+/// @defgroup ext_matrix_relational GLM_EXT_matrix_relational
+/// @ingroup ext
+///
+/// Exposes comparison functions for matrix types that take a user defined epsilon values.
+///
+/// Include <glm/ext/matrix_relational.hpp> to use the features of this extension.
+///
+/// @see ext_vector_relational
+/// @see ext_scalar_relational
+/// @see ext_quaternion_relational
+
+#pragma once
+
+// Dependencies
+#include "../detail/qualifier.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_relational extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_relational
+ /// @{
+
+ /// Perform a component-wise equal-to comparison of two matrices.
+ /// Return a boolean vector which components value is True if this expression is satisfied per column of the matrices.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y);
+
+ /// Perform a component-wise not-equal-to comparison of two matrices.
+ /// Return a boolean vector which components value is True if this expression is satisfied per column of the matrices.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y);
+
+ /// Returns the component-wise comparison of |x - y| < epsilon.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, T epsilon);
+
+ /// Returns the component-wise comparison of |x - y| < epsilon.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, T, Q> const& epsilon);
+
+ /// Returns the component-wise comparison of |x - y| < epsilon.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, T epsilon);
+
+ /// Returns the component-wise comparison of |x - y| >= epsilon.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, T, Q> const& epsilon);
+
+ /// Returns the component-wise comparison between two vectors in term of ULPs.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, int ULPs);
+
+ /// Returns the component-wise comparison between two vectors in term of ULPs.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, int, Q> const& ULPs);
+
+ /// Returns the component-wise comparison between two vectors in term of ULPs.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, int ULPs);
+
+ /// Returns the component-wise comparison between two vectors in term of ULPs.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam C Integer between 1 and 4 included that qualify the number of columns of the matrix
+ /// @tparam R Integer between 1 and 4 included that qualify the number of rows of the matrix
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, vec<C, int, Q> const& ULPs);
+
+ /// @}
+}//namespace glm
+
+#include "matrix_relational.inl"
diff --git a/src/include/glm/ext/matrix_relational.inl b/src/include/glm/ext/matrix_relational.inl
new file mode 100644
index 0000000..1b8f04b
--- /dev/null
+++ b/src/include/glm/ext/matrix_relational.inl
@@ -0,0 +1,82 @@
+/// @ref ext_vector_relational
+/// @file glm/ext/vector_relational.inl
+
+// Dependency:
+#include "../ext/vector_relational.hpp"
+#include "../common.hpp"
+
+namespace glm
+{
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b)
+ {
+ return equal(a, b, static_cast<T>(0));
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, T Epsilon)
+ {
+ return equal(a, b, vec<C, T, Q>(Epsilon));
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, vec<C, T, Q> const& Epsilon)
+ {
+ vec<C, bool, Q> Result(true);
+ for(length_t i = 0; i < C; ++i)
+ Result[i] = all(equal(a[i], b[i], Epsilon[i]));
+ return Result;
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y)
+ {
+ return notEqual(x, y, static_cast<T>(0));
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, T Epsilon)
+ {
+ return notEqual(x, y, vec<C, T, Q>(Epsilon));
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, vec<C, T, Q> const& Epsilon)
+ {
+ vec<C, bool, Q> Result(true);
+ for(length_t i = 0; i < C; ++i)
+ Result[i] = any(notEqual(a[i], b[i], Epsilon[i]));
+ return Result;
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, int MaxULPs)
+ {
+ return equal(a, b, vec<C, int, Q>(MaxULPs));
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, vec<C, int, Q> const& MaxULPs)
+ {
+ vec<C, bool, Q> Result(true);
+ for(length_t i = 0; i < C; ++i)
+ Result[i] = all(equal(a[i], b[i], MaxULPs[i]));
+ return Result;
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, int MaxULPs)
+ {
+ return notEqual(x, y, vec<C, int, Q>(MaxULPs));
+ }
+
+ template<length_t C, length_t R, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, vec<C, int, Q> const& MaxULPs)
+ {
+ vec<C, bool, Q> Result(true);
+ for(length_t i = 0; i < C; ++i)
+ Result[i] = any(notEqual(a[i], b[i], MaxULPs[i]));
+ return Result;
+ }
+
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_transform.hpp b/src/include/glm/ext/matrix_transform.hpp
new file mode 100644
index 0000000..268e0ec
--- /dev/null
+++ b/src/include/glm/ext/matrix_transform.hpp
@@ -0,0 +1,144 @@
+/// @ref ext_matrix_transform
+/// @file glm/ext/matrix_transform.hpp
+///
+/// @defgroup ext_matrix_transform GLM_EXT_matrix_transform
+/// @ingroup ext
+///
+/// Defines functions that generate common transformation matrices.
+///
+/// The matrices generated by this extension use standard OpenGL fixed-function
+/// conventions. For example, the lookAt function generates a transform from world
+/// space into the specific eye space that the projective matrix functions
+/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility
+/// specifications defines the particular layout of this eye space.
+///
+/// Include <glm/ext/matrix_transform.hpp> to use the features of this extension.
+///
+/// @see ext_matrix_projection
+/// @see ext_matrix_clip_space
+
+#pragma once
+
+// Dependencies
+#include "../gtc/constants.hpp"
+#include "../geometric.hpp"
+#include "../trigonometric.hpp"
+#include "../matrix.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_transform extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_transform
+ /// @{
+
+ /// Builds an identity matrix.
+ template<typename genType>
+ GLM_FUNC_DECL GLM_CONSTEXPR genType identity();
+
+ /// Builds a translation 4 * 4 matrix created from a vector of 3 components.
+ ///
+ /// @param m Input matrix multiplied by this translation matrix.
+ /// @param v Coordinates of a translation vector.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ ///
+ /// @code
+ /// #include <glm/glm.hpp>
+ /// #include <glm/gtc/matrix_transform.hpp>
+ /// ...
+ /// glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f));
+ /// // m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f
+ /// // m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f
+ /// // m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f
+ /// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f
+ /// @endcode
+ ///
+ /// @see - translate(mat<4, 4, T, Q> const& m, T x, T y, T z)
+ /// @see - translate(vec<3, T, Q> const& v)
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTranslate.xml">glTranslate man page</a>
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL mat<4, 4, T, Q> translate(
+ mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
+
+ /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
+ ///
+ /// @param m Input matrix multiplied by this rotation matrix.
+ /// @param angle Rotation angle expressed in radians.
+ /// @param axis Rotation axis, recommended to be normalized.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ ///
+ /// @see - rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z)
+ /// @see - rotate(T angle, vec<3, T, Q> const& v)
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glRotate.xml">glRotate man page</a>
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL mat<4, 4, T, Q> rotate(
+ mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& axis);
+
+ /// Builds a scale 4 * 4 matrix created from 3 scalars.
+ ///
+ /// @param m Input matrix multiplied by this scale matrix.
+ /// @param v Ratio of scaling for each axis.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ ///
+ /// @see - scale(mat<4, 4, T, Q> const& m, T x, T y, T z)
+ /// @see - scale(vec<3, T, Q> const& v)
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glScale.xml">glScale man page</a>
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL mat<4, 4, T, Q> scale(
+ mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v);
+
+ /// Build a right handed look at view matrix.
+ ///
+ /// @param eye Position of the camera
+ /// @param center Position where the camera is looking at
+ /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ ///
+ /// @see - frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal)
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL mat<4, 4, T, Q> lookAtRH(
+ vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
+
+ /// Build a left handed look at view matrix.
+ ///
+ /// @param eye Position of the camera
+ /// @param center Position where the camera is looking at
+ /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ ///
+ /// @see - frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal)
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL mat<4, 4, T, Q> lookAtLH(
+ vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
+
+ /// Build a look at view matrix based on the default handedness.
+ ///
+ /// @param eye Position of the camera
+ /// @param center Position where the camera is looking at
+ /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ ///
+ /// @see - frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal) frustum(T const& left, T const& right, T const& bottom, T const& top, T const& nearVal, T const& farVal)
+ /// @see <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluLookAt.xml">gluLookAt man page</a>
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL mat<4, 4, T, Q> lookAt(
+ vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up);
+
+ /// @}
+}//namespace glm
+
+#include "matrix_transform.inl"
diff --git a/src/include/glm/ext/matrix_transform.inl b/src/include/glm/ext/matrix_transform.inl
new file mode 100644
index 0000000..4e122f6
--- /dev/null
+++ b/src/include/glm/ext/matrix_transform.inl
@@ -0,0 +1,152 @@
+namespace glm
+{
+ template<typename genType>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType identity()
+ {
+ return detail::init_gentype<genType, detail::genTypeTrait<genType>::GENTYPE>::identity();
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v)
+ {
+ mat<4, 4, T, Q> Result(m);
+ Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
+ return Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& v)
+ {
+ T const a = angle;
+ T const c = cos(a);
+ T const s = sin(a);
+
+ vec<3, T, Q> axis(normalize(v));
+ vec<3, T, Q> temp((T(1) - c) * axis);
+
+ mat<4, 4, T, Q> Rotate;
+ Rotate[0][0] = c + temp[0] * axis[0];
+ Rotate[0][1] = temp[0] * axis[1] + s * axis[2];
+ Rotate[0][2] = temp[0] * axis[2] - s * axis[1];
+
+ Rotate[1][0] = temp[1] * axis[0] - s * axis[2];
+ Rotate[1][1] = c + temp[1] * axis[1];
+ Rotate[1][2] = temp[1] * axis[2] + s * axis[0];
+
+ Rotate[2][0] = temp[2] * axis[0] + s * axis[1];
+ Rotate[2][1] = temp[2] * axis[1] - s * axis[0];
+ Rotate[2][2] = c + temp[2] * axis[2];
+
+ mat<4, 4, T, Q> Result;
+ Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];
+ Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];
+ Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];
+ Result[3] = m[3];
+ return Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate_slow(mat<4, 4, T, Q> const& m, T angle, vec<3, T, Q> const& v)
+ {
+ T const a = angle;
+ T const c = cos(a);
+ T const s = sin(a);
+ mat<4, 4, T, Q> Result;
+
+ vec<3, T, Q> axis = normalize(v);
+
+ Result[0][0] = c + (static_cast<T>(1) - c) * axis.x * axis.x;
+ Result[0][1] = (static_cast<T>(1) - c) * axis.x * axis.y + s * axis.z;
+ Result[0][2] = (static_cast<T>(1) - c) * axis.x * axis.z - s * axis.y;
+ Result[0][3] = static_cast<T>(0);
+
+ Result[1][0] = (static_cast<T>(1) - c) * axis.y * axis.x - s * axis.z;
+ Result[1][1] = c + (static_cast<T>(1) - c) * axis.y * axis.y;
+ Result[1][2] = (static_cast<T>(1) - c) * axis.y * axis.z + s * axis.x;
+ Result[1][3] = static_cast<T>(0);
+
+ Result[2][0] = (static_cast<T>(1) - c) * axis.z * axis.x + s * axis.y;
+ Result[2][1] = (static_cast<T>(1) - c) * axis.z * axis.y - s * axis.x;
+ Result[2][2] = c + (static_cast<T>(1) - c) * axis.z * axis.z;
+ Result[2][3] = static_cast<T>(0);
+
+ Result[3] = vec<4, T, Q>(0, 0, 0, 1);
+ return m * Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v)
+ {
+ mat<4, 4, T, Q> Result;
+ Result[0] = m[0] * v[0];
+ Result[1] = m[1] * v[1];
+ Result[2] = m[2] * v[2];
+ Result[3] = m[3];
+ return Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale_slow(mat<4, 4, T, Q> const& m, vec<3, T, Q> const& v)
+ {
+ mat<4, 4, T, Q> Result(T(1));
+ Result[0][0] = v.x;
+ Result[1][1] = v.y;
+ Result[2][2] = v.z;
+ return m * Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> lookAtRH(vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up)
+ {
+ vec<3, T, Q> const f(normalize(center - eye));
+ vec<3, T, Q> const s(normalize(cross(f, up)));
+ vec<3, T, Q> const u(cross(s, f));
+
+ mat<4, 4, T, Q> Result(1);
+ Result[0][0] = s.x;
+ Result[1][0] = s.y;
+ Result[2][0] = s.z;
+ Result[0][1] = u.x;
+ Result[1][1] = u.y;
+ Result[2][1] = u.z;
+ Result[0][2] =-f.x;
+ Result[1][2] =-f.y;
+ Result[2][2] =-f.z;
+ Result[3][0] =-dot(s, eye);
+ Result[3][1] =-dot(u, eye);
+ Result[3][2] = dot(f, eye);
+ return Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> lookAtLH(vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up)
+ {
+ vec<3, T, Q> const f(normalize(center - eye));
+ vec<3, T, Q> const s(normalize(cross(up, f)));
+ vec<3, T, Q> const u(cross(f, s));
+
+ mat<4, 4, T, Q> Result(1);
+ Result[0][0] = s.x;
+ Result[1][0] = s.y;
+ Result[2][0] = s.z;
+ Result[0][1] = u.x;
+ Result[1][1] = u.y;
+ Result[2][1] = u.z;
+ Result[0][2] = f.x;
+ Result[1][2] = f.y;
+ Result[2][2] = f.z;
+ Result[3][0] = -dot(s, eye);
+ Result[3][1] = -dot(u, eye);
+ Result[3][2] = -dot(f, eye);
+ return Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER mat<4, 4, T, Q> lookAt(vec<3, T, Q> const& eye, vec<3, T, Q> const& center, vec<3, T, Q> const& up)
+ {
+ GLM_IF_CONSTEXPR(GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT)
+ return lookAtLH(eye, center, up);
+ else
+ return lookAtRH(eye, center, up);
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint2x2.hpp b/src/include/glm/ext/matrix_uint2x2.hpp
new file mode 100644
index 0000000..a98e5e4
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint2x2.hpp
@@ -0,0 +1,38 @@
+/// @ref ext_matrix_uint2x2
+/// @file glm/ext/matrix_uint2x2.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint2x2 GLM_EXT_matrix_uint2x2
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint2x2.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x2.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint2x2 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint2x2
+ /// @{
+
+ /// Unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2
+ typedef mat<2, 2, uint, defaultp> umat2x2;
+
+ /// Unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2
+ typedef mat<2, 2, uint, defaultp> umat2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint2x2_sized.hpp b/src/include/glm/ext/matrix_uint2x2_sized.hpp
new file mode 100644
index 0000000..9429603
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint2x2_sized.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_matrix_uint2x2_sized
+/// @file glm/ext/matrix_uint2x2_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint2x2_sized GLM_EXT_matrix_uint2x2_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint2x2_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x2.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint2x2_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint2x2_sized
+ /// @{
+
+ /// 8 bit unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2_sized
+ typedef mat<2, 2, uint8, defaultp> u8mat2x2;
+
+ /// 16 bit unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2_sized
+ typedef mat<2, 2, uint16, defaultp> u16mat2x2;
+
+ /// 32 bit unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2_sized
+ typedef mat<2, 2, uint32, defaultp> u32mat2x2;
+
+ /// 64 bit unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2_sized
+ typedef mat<2, 2, uint64, defaultp> u64mat2x2;
+
+
+ /// 8 bit unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2_sized
+ typedef mat<2, 2, uint8, defaultp> u8mat2;
+
+ /// 16 bit unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2_sized
+ typedef mat<2, 2, uint16, defaultp> u16mat2;
+
+ /// 32 bit unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2_sized
+ typedef mat<2, 2, uint32, defaultp> u32mat2;
+
+ /// 64 bit unsigned integer 2x2 matrix.
+ ///
+ /// @see ext_matrix_uint2x2_sized
+ typedef mat<2, 2, uint64, defaultp> u64mat2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint2x3.hpp b/src/include/glm/ext/matrix_uint2x3.hpp
new file mode 100644
index 0000000..02e02cd
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint2x3.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_uint2x3
+/// @file glm/ext/matrix_uint2x3.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int2x3 GLM_EXT_matrix_uint2x3
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint2x3.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x3.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint2x3 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint2x3
+ /// @{
+
+ /// Unsigned integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_uint2x3
+ typedef mat<2, 3, uint, defaultp> umat2x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint2x3_sized.hpp b/src/include/glm/ext/matrix_uint2x3_sized.hpp
new file mode 100644
index 0000000..5dca929
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint2x3_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_uint2x3_sized
+/// @file glm/ext/matrix_uint2x3_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint2x3_sized GLM_EXT_matrix_uint2x3_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint2x3_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x3.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint2x3_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint2x3_sized
+ /// @{
+
+ /// 8 bit unsigned integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_uint2x3_sized
+ typedef mat<2, 3, uint8, defaultp> u8mat2x3;
+
+ /// 16 bit unsigned integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_uint2x3_sized
+ typedef mat<2, 3, uint16, defaultp> u16mat2x3;
+
+ /// 32 bit unsigned integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_uint2x3_sized
+ typedef mat<2, 3, uint32, defaultp> u32mat2x3;
+
+ /// 64 bit unsigned integer 2x3 matrix.
+ ///
+ /// @see ext_matrix_uint2x3_sized
+ typedef mat<2, 3, uint64, defaultp> u64mat2x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint2x4.hpp b/src/include/glm/ext/matrix_uint2x4.hpp
new file mode 100644
index 0000000..63bfbc2
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint2x4.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_uint2x4
+/// @file glm/ext/matrix_uint2x4.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint2x4 GLM_EXT_matrix_int2x4
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint2x4.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x4.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint2x4 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint2x4
+ /// @{
+
+ /// Unsigned integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_uint2x4
+ typedef mat<2, 4, uint, defaultp> umat2x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint2x4_sized.hpp b/src/include/glm/ext/matrix_uint2x4_sized.hpp
new file mode 100644
index 0000000..f3c08cf
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint2x4_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_uint2x4_sized
+/// @file glm/ext/matrixu_uint2x4_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint2x4_sized GLM_EXT_matrix_uint2x4_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint2x4_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat2x4.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint2x4_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint2x4_sized
+ /// @{
+
+ /// 8 bit unsigned integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_uint2x4_sized
+ typedef mat<2, 4, uint8, defaultp> u8mat2x4;
+
+ /// 16 bit unsigned integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_uint2x4_sized
+ typedef mat<2, 4, uint16, defaultp> u16mat2x4;
+
+ /// 32 bit unsigned integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_uint2x4_sized
+ typedef mat<2, 4, uint32, defaultp> u32mat2x4;
+
+ /// 64 bit unsigned integer 2x4 matrix.
+ ///
+ /// @see ext_matrix_uint2x4_sized
+ typedef mat<2, 4, uint64, defaultp> u64mat2x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint3x2.hpp b/src/include/glm/ext/matrix_uint3x2.hpp
new file mode 100644
index 0000000..ebe2b30
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint3x2.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_uint3x2
+/// @file glm/ext/matrix_uint3x2.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_int3x2 GLM_EXT_matrix_uint3x2
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint3x2.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x2.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint3x2 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint3x2
+ /// @{
+
+ /// Unsigned integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_uint3x2
+ typedef mat<3, 2, uint, defaultp> umat3x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint3x2_sized.hpp b/src/include/glm/ext/matrix_uint3x2_sized.hpp
new file mode 100644
index 0000000..7ed601f
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint3x2_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_uint3x2_sized
+/// @file glm/ext/matrix_uint3x2_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint3x2_sized GLM_EXT_matrix_uint3x2_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint3x2_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x2.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint3x2_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint3x2_sized
+ /// @{
+
+ /// 8 bit signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_uint3x2_sized
+ typedef mat<3, 2, uint8, defaultp> u8mat3x2;
+
+ /// 16 bit signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_uint3x2_sized
+ typedef mat<3, 2, uint16, defaultp> u16mat3x2;
+
+ /// 32 bit signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_uint3x2_sized
+ typedef mat<3, 2, uint32, defaultp> u32mat3x2;
+
+ /// 64 bit signed integer 3x2 matrix.
+ ///
+ /// @see ext_matrix_uint3x2_sized
+ typedef mat<3, 2, uint64, defaultp> u64mat3x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint3x3.hpp b/src/include/glm/ext/matrix_uint3x3.hpp
new file mode 100644
index 0000000..f66dca3
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint3x3.hpp
@@ -0,0 +1,38 @@
+/// @ref ext_matrix_uint3x3
+/// @file glm/ext/matrix_uint3x3.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint3x3 GLM_EXT_matrix_uint3x3
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint3x3.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x3.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint3x3 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint3x3
+ /// @{
+
+ /// Unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3
+ typedef mat<3, 3, uint, defaultp> umat3x3;
+
+ /// Unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3
+ typedef mat<3, 3, uint, defaultp> umat3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint3x3_sized.hpp b/src/include/glm/ext/matrix_uint3x3_sized.hpp
new file mode 100644
index 0000000..86a2fdd
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint3x3_sized.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_matrix_uint3x3_sized
+/// @file glm/ext/matrix_uint3x3_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint3x3_sized GLM_EXT_matrix_uint3x3_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint3x3_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x3.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint3x3_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint3x3_sized
+ /// @{
+
+ /// 8 bit unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3_sized
+ typedef mat<3, 3, uint8, defaultp> u8mat3x3;
+
+ /// 16 bit unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3_sized
+ typedef mat<3, 3, uint16, defaultp> u16mat3x3;
+
+ /// 32 bit unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3_sized
+ typedef mat<3, 3, uint32, defaultp> u32mat3x3;
+
+ /// 64 bit unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3_sized
+ typedef mat<3, 3, uint64, defaultp> u64mat3x3;
+
+
+ /// 8 bit unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3_sized
+ typedef mat<3, 3, uint8, defaultp> u8mat3;
+
+ /// 16 bit unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3_sized
+ typedef mat<3, 3, uint16, defaultp> u16mat3;
+
+ /// 32 bit unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3_sized
+ typedef mat<3, 3, uint32, defaultp> u32mat3;
+
+ /// 64 bit unsigned integer 3x3 matrix.
+ ///
+ /// @see ext_matrix_uint3x3_sized
+ typedef mat<3, 3, uint64, defaultp> u64mat3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint3x4.hpp b/src/include/glm/ext/matrix_uint3x4.hpp
new file mode 100644
index 0000000..d5a16a2
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint3x4.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_uint3x4
+/// @file glm/ext/matrix_uint3x4.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint3x4 GLM_EXT_matrix_uint3x4
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint3x4.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x4.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint3x4 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint3x4
+ /// @{
+
+ /// Signed integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_uint3x4
+ typedef mat<3, 4, uint, defaultp> umat3x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint3x4_sized.hpp b/src/include/glm/ext/matrix_uint3x4_sized.hpp
new file mode 100644
index 0000000..0c7def3
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint3x4_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_uint3x4_sized
+/// @file glm/ext/matrix_uint3x2_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint3x4_sized GLM_EXT_matrix_uint3x4_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint3x4_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat3x4.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint3x4_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint3x4_sized
+ /// @{
+
+ /// 8 bit unsigned integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_uint3x4_sized
+ typedef mat<3, 4, uint8, defaultp> u8mat3x4;
+
+ /// 16 bit unsigned integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_uint3x4_sized
+ typedef mat<3, 4, uint16, defaultp> u16mat3x4;
+
+ /// 32 bit unsigned integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_uint3x4_sized
+ typedef mat<3, 4, uint32, defaultp> u32mat3x4;
+
+ /// 64 bit unsigned integer 3x4 matrix.
+ ///
+ /// @see ext_matrix_uint3x4_sized
+ typedef mat<3, 4, uint64, defaultp> u64mat3x4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint4x2.hpp b/src/include/glm/ext/matrix_uint4x2.hpp
new file mode 100644
index 0000000..e602c4c
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint4x2.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_uint4x2
+/// @file glm/ext/matrix_uint4x2.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint4x2 GLM_EXT_matrix_uint4x2
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint4x2.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x2.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint4x2 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint4x2
+ /// @{
+
+ /// Unsigned integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_uint4x2
+ typedef mat<4, 2, uint, defaultp> umat4x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint4x2_sized.hpp b/src/include/glm/ext/matrix_uint4x2_sized.hpp
new file mode 100644
index 0000000..02602d9
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint4x2_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_uint4x2_sized
+/// @file glm/ext/matrix_uint4x2_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint4x2_sized GLM_EXT_matrix_uint4x2_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint4x2_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x2.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint4x2_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint4x2_sized
+ /// @{
+
+ /// 8 bit unsigned integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_uint4x2_sized
+ typedef mat<4, 2, uint8, defaultp> u8mat4x2;
+
+ /// 16 bit unsigned integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_uint4x2_sized
+ typedef mat<4, 2, uint16, defaultp> u16mat4x2;
+
+ /// 32 bit unsigned integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_uint4x2_sized
+ typedef mat<4, 2, uint32, defaultp> u32mat4x2;
+
+ /// 64 bit unsigned integer 4x2 matrix.
+ ///
+ /// @see ext_matrix_uint4x2_sized
+ typedef mat<4, 2, uint64, defaultp> u64mat4x2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint4x3.hpp b/src/include/glm/ext/matrix_uint4x3.hpp
new file mode 100644
index 0000000..b56d786
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint4x3.hpp
@@ -0,0 +1,33 @@
+/// @ref ext_matrix_uint4x3
+/// @file glm/ext/matrix_uint4x3.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint4x3 GLM_EXT_matrix_uint4x3
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint4x3.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x3.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint4x3 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint4x3
+ /// @{
+
+ /// Unsigned integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_uint4x3
+ typedef mat<4, 3, uint, defaultp> umat4x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint4x3_sized.hpp b/src/include/glm/ext/matrix_uint4x3_sized.hpp
new file mode 100644
index 0000000..5a56796
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint4x3_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_matrix_uint4x3_sized
+/// @file glm/ext/matrix_uint4x3_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint4x3_sized GLM_EXT_matrix_uint4x3_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint4x3_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x3.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint4x3_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint4x3_sized
+ /// @{
+
+ /// 8 bit unsigned integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_uint4x3_sized
+ typedef mat<4, 3, uint8, defaultp> u8mat4x3;
+
+ /// 16 bit unsigned integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_uint4x3_sized
+ typedef mat<4, 3, uint16, defaultp> u16mat4x3;
+
+ /// 32 bit unsigned integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_uint4x3_sized
+ typedef mat<4, 3, uint32, defaultp> u32mat4x3;
+
+ /// 64 bit unsigned integer 4x3 matrix.
+ ///
+ /// @see ext_matrix_uint4x3_sized
+ typedef mat<4, 3, uint64, defaultp> u64mat4x3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint4x4.hpp b/src/include/glm/ext/matrix_uint4x4.hpp
new file mode 100644
index 0000000..b3e949a
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint4x4.hpp
@@ -0,0 +1,38 @@
+/// @ref ext_matrix_uint4x4
+/// @file glm/ext/matrix_uint4x4.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint4x4 GLM_EXT_matrix_uint4x4
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint4x4.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x4.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint4x4 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint4x4
+ /// @{
+
+ /// Unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4
+ typedef mat<4, 4, uint, defaultp> umat4x4;
+
+ /// Unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4
+ typedef mat<4, 4, uint, defaultp> umat4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/matrix_uint4x4_sized.hpp b/src/include/glm/ext/matrix_uint4x4_sized.hpp
new file mode 100644
index 0000000..60395d4
--- /dev/null
+++ b/src/include/glm/ext/matrix_uint4x4_sized.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_matrix_uint4x4_sized
+/// @file glm/ext/matrix_uint4x4_sized.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_matrix_uint4x4_sized GLM_EXT_matrix_uint4x4_sized
+/// @ingroup ext
+///
+/// Include <glm/ext/matrix_uint4x4_sized.hpp> to use the features of this extension.
+///
+/// Defines a number of matrices with integer types.
+
+#pragma once
+
+// Dependency:
+#include "../mat4x4.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_matrix_uint4x4_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_matrix_uint4x4_sized
+ /// @{
+
+ /// 8 bit unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4_sized
+ typedef mat<4, 4, uint8, defaultp> u8mat4x4;
+
+ /// 16 bit unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4_sized
+ typedef mat<4, 4, uint16, defaultp> u16mat4x4;
+
+ /// 32 bit unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4_sized
+ typedef mat<4, 4, uint32, defaultp> u32mat4x4;
+
+ /// 64 bit unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4_sized
+ typedef mat<4, 4, uint64, defaultp> u64mat4x4;
+
+
+ /// 8 bit unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4_sized
+ typedef mat<4, 4, uint8, defaultp> u8mat4;
+
+ /// 16 bit unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4_sized
+ typedef mat<4, 4, uint16, defaultp> u16mat4;
+
+ /// 32 bit unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4_sized
+ typedef mat<4, 4, uint32, defaultp> u32mat4;
+
+ /// 64 bit unsigned integer 4x4 matrix.
+ ///
+ /// @see ext_matrix_uint4x4_sized
+ typedef mat<4, 4, uint64, defaultp> u64mat4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/quaternion_common.hpp b/src/include/glm/ext/quaternion_common.hpp
new file mode 100644
index 0000000..a146d49
--- /dev/null
+++ b/src/include/glm/ext/quaternion_common.hpp
@@ -0,0 +1,135 @@
+/// @ref ext_quaternion_common
+/// @file glm/ext/quaternion_common.hpp
+///
+/// @defgroup ext_quaternion_common GLM_EXT_quaternion_common
+/// @ingroup ext
+///
+/// Provides common functions for quaternion types
+///
+/// Include <glm/ext/quaternion_common.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_common
+/// @see ext_vector_common
+/// @see ext_quaternion_float
+/// @see ext_quaternion_double
+/// @see ext_quaternion_exponential
+/// @see ext_quaternion_geometric
+/// @see ext_quaternion_relational
+/// @see ext_quaternion_trigonometric
+/// @see ext_quaternion_transform
+
+#pragma once
+
+// Dependency:
+#include "../ext/scalar_constants.hpp"
+#include "../ext/quaternion_geometric.hpp"
+#include "../common.hpp"
+#include "../trigonometric.hpp"
+#include "../exponential.hpp"
+#include <limits>
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_common extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_common
+ /// @{
+
+ /// Spherical linear interpolation of two quaternions.
+ /// The interpolation is oriented and the rotation is performed at constant speed.
+ /// For short path spherical linear interpolation, use the slerp function.
+ ///
+ /// @param x A quaternion
+ /// @param y A quaternion
+ /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ ///
+ /// @see - slerp(qua<T, Q> const& x, qua<T, Q> const& y, T const& a)
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> mix(qua<T, Q> const& x, qua<T, Q> const& y, T a);
+
+ /// Linear interpolation of two quaternions.
+ /// The interpolation is oriented.
+ ///
+ /// @param x A quaternion
+ /// @param y A quaternion
+ /// @param a Interpolation factor. The interpolation is defined in the range [0, 1].
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> lerp(qua<T, Q> const& x, qua<T, Q> const& y, T a);
+
+ /// Spherical linear interpolation of two quaternions.
+ /// The interpolation always take the short path and the rotation is performed at constant speed.
+ ///
+ /// @param x A quaternion
+ /// @param y A quaternion
+ /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a);
+
+ /// Spherical linear interpolation of two quaternions with multiple spins over rotation axis.
+ /// The interpolation always take the short path when the spin count is positive and long path
+ /// when count is negative. Rotation is performed at constant speed.
+ ///
+ /// @param x A quaternion
+ /// @param y A quaternion
+ /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].
+ /// @param k Additional spin count. If Value is negative interpolation will be on "long" path.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam S An integer scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, typename S, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k);
+
+ /// Returns the q conjugate.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> conjugate(qua<T, Q> const& q);
+
+ /// Returns the q inverse.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> inverse(qua<T, Q> const& q);
+
+ /// Returns true if x holds a NaN (not a number)
+ /// representation in the underlying implementation's set of
+ /// floating point representations. Returns false otherwise,
+ /// including for implementations with no NaN
+ /// representations.
+ ///
+ /// /!\ When using compiler fast math, this function may fail.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL vec<4, bool, Q> isnan(qua<T, Q> const& x);
+
+ /// Returns true if x holds a positive infinity or negative
+ /// infinity representation in the underlying implementation's
+ /// set of floating point representations. Returns false
+ /// otherwise, including for implementations with no infinity
+ /// representations.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL vec<4, bool, Q> isinf(qua<T, Q> const& x);
+
+ /// @}
+} //namespace glm
+
+#include "quaternion_common.inl"
diff --git a/src/include/glm/ext/quaternion_common.inl b/src/include/glm/ext/quaternion_common.inl
new file mode 100644
index 0000000..af4d888
--- /dev/null
+++ b/src/include/glm/ext/quaternion_common.inl
@@ -0,0 +1,144 @@
+namespace glm
+{
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> mix(qua<T, Q> const& x, qua<T, Q> const& y, T a)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'mix' only accept floating-point inputs");
+
+ T const cosTheta = dot(x, y);
+
+ // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator
+ if(cosTheta > static_cast<T>(1) - epsilon<T>())
+ {
+ // Linear interpolation
+ return qua<T, Q>(
+ mix(x.w, y.w, a),
+ mix(x.x, y.x, a),
+ mix(x.y, y.y, a),
+ mix(x.z, y.z, a));
+ }
+ else
+ {
+ // Essential Mathematics, page 467
+ T angle = acos(cosTheta);
+ return (sin((static_cast<T>(1) - a) * angle) * x + sin(a * angle) * y) / sin(angle);
+ }
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> lerp(qua<T, Q> const& x, qua<T, Q> const& y, T a)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'lerp' only accept floating-point inputs");
+
+ // Lerp is only defined in [0, 1]
+ assert(a >= static_cast<T>(0));
+ assert(a <= static_cast<T>(1));
+
+ return x * (static_cast<T>(1) - a) + (y * a);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'slerp' only accept floating-point inputs");
+
+ qua<T, Q> z = y;
+
+ T cosTheta = dot(x, y);
+
+ // If cosTheta < 0, the interpolation will take the long way around the sphere.
+ // To fix this, one quat must be negated.
+ if(cosTheta < static_cast<T>(0))
+ {
+ z = -y;
+ cosTheta = -cosTheta;
+ }
+
+ // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator
+ if(cosTheta > static_cast<T>(1) - epsilon<T>())
+ {
+ // Linear interpolation
+ return qua<T, Q>(
+ mix(x.w, z.w, a),
+ mix(x.x, z.x, a),
+ mix(x.y, z.y, a),
+ mix(x.z, z.z, a));
+ }
+ else
+ {
+ // Essential Mathematics, page 467
+ T angle = acos(cosTheta);
+ return (sin((static_cast<T>(1) - a) * angle) * x + sin(a * angle) * z) / sin(angle);
+ }
+ }
+
+ template<typename T, typename S, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> slerp(qua<T, Q> const& x, qua<T, Q> const& y, T a, S k)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'slerp' only accept floating-point inputs");
+ GLM_STATIC_ASSERT(std::numeric_limits<S>::is_integer, "'slerp' only accept integer for spin count");
+
+ qua<T, Q> z = y;
+
+ T cosTheta = dot(x, y);
+
+ // If cosTheta < 0, the interpolation will take the long way around the sphere.
+ // To fix this, one quat must be negated.
+ if (cosTheta < static_cast<T>(0))
+ {
+ z = -y;
+ cosTheta = -cosTheta;
+ }
+
+ // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator
+ if (cosTheta > static_cast<T>(1) - epsilon<T>())
+ {
+ // Linear interpolation
+ return qua<T, Q>(
+ mix(x.w, z.w, a),
+ mix(x.x, z.x, a),
+ mix(x.y, z.y, a),
+ mix(x.z, z.z, a));
+ }
+ else
+ {
+ // Graphics Gems III, page 96
+ T angle = acos(cosTheta);
+ T phi = angle + k * glm::pi<T>();
+ return (sin(angle - a * phi)* x + sin(a * phi) * z) / sin(angle);
+ }
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> conjugate(qua<T, Q> const& q)
+ {
+ return qua<T, Q>(q.w, -q.x, -q.y, -q.z);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> inverse(qua<T, Q> const& q)
+ {
+ return conjugate(q) / dot(q, q);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, bool, Q> isnan(qua<T, Q> const& q)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs");
+
+ return vec<4, bool, Q>(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w));
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, bool, Q> isinf(qua<T, Q> const& q)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isinf' only accept floating-point inputs");
+
+ return vec<4, bool, Q>(isinf(q.x), isinf(q.y), isinf(q.z), isinf(q.w));
+ }
+}//namespace glm
+
+#if GLM_CONFIG_SIMD == GLM_ENABLE
+# include "quaternion_common_simd.inl"
+#endif
+
diff --git a/src/include/glm/ext/quaternion_common_simd.inl b/src/include/glm/ext/quaternion_common_simd.inl
new file mode 100644
index 0000000..c7abd88
--- /dev/null
+++ b/src/include/glm/ext/quaternion_common_simd.inl
@@ -0,0 +1,18 @@
+#if GLM_ARCH & GLM_ARCH_SSE2_BIT
+
+namespace glm{
+namespace detail
+{
+ template<qualifier Q>
+ struct compute_dot<qua<float, Q>, float, true>
+ {
+ static GLM_FUNC_QUALIFIER float call(qua<float, Q> const& x, qua<float, Q> const& y)
+ {
+ return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data));
+ }
+ };
+}//namespace detail
+}//namespace glm
+
+#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
+
diff --git a/src/include/glm/ext/quaternion_double.hpp b/src/include/glm/ext/quaternion_double.hpp
new file mode 100644
index 0000000..9ec2895
--- /dev/null
+++ b/src/include/glm/ext/quaternion_double.hpp
@@ -0,0 +1,39 @@
+/// @ref ext_quaternion_double
+/// @file glm/ext/quaternion_double.hpp
+///
+/// @defgroup ext_quaternion_double GLM_EXT_quaternion_double
+/// @ingroup ext
+///
+/// Exposes double-precision floating point quaternion type.
+///
+/// Include <glm/ext/quaternion_double.hpp> to use the features of this extension.
+///
+/// @see ext_quaternion_float
+/// @see ext_quaternion_double_precision
+/// @see ext_quaternion_common
+/// @see ext_quaternion_exponential
+/// @see ext_quaternion_geometric
+/// @see ext_quaternion_relational
+/// @see ext_quaternion_transform
+/// @see ext_quaternion_trigonometric
+
+#pragma once
+
+// Dependency:
+#include "../detail/type_quat.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_double extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_double
+ /// @{
+
+ /// Quaternion of double-precision floating-point numbers.
+ typedef qua<double, defaultp> dquat;
+
+ /// @}
+} //namespace glm
+
diff --git a/src/include/glm/ext/quaternion_double_precision.hpp b/src/include/glm/ext/quaternion_double_precision.hpp
new file mode 100644
index 0000000..9cf390a
--- /dev/null
+++ b/src/include/glm/ext/quaternion_double_precision.hpp
@@ -0,0 +1,42 @@
+/// @ref ext_quaternion_double_precision
+/// @file glm/ext/quaternion_double_precision.hpp
+///
+/// @defgroup ext_quaternion_double_precision GLM_EXT_quaternion_double_precision
+/// @ingroup ext
+///
+/// Exposes double-precision floating point quaternion type with various precision in term of ULPs.
+///
+/// Include <glm/ext/quaternion_double_precision.hpp> to use the features of this extension.
+
+#pragma once
+
+// Dependency:
+#include "../detail/type_quat.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_double_precision extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_double_precision
+ /// @{
+
+ /// Quaternion of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see ext_quaternion_double_precision
+ typedef qua<double, lowp> lowp_dquat;
+
+ /// Quaternion of medium double-qualifier floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see ext_quaternion_double_precision
+ typedef qua<double, mediump> mediump_dquat;
+
+ /// Quaternion of high double-qualifier floating-point numbers using high precision arithmetic in term of ULPs.
+ ///
+ /// @see ext_quaternion_double_precision
+ typedef qua<double, highp> highp_dquat;
+
+ /// @}
+} //namespace glm
+
diff --git a/src/include/glm/ext/quaternion_exponential.hpp b/src/include/glm/ext/quaternion_exponential.hpp
new file mode 100644
index 0000000..75a6441
--- /dev/null
+++ b/src/include/glm/ext/quaternion_exponential.hpp
@@ -0,0 +1,63 @@
+/// @ref ext_quaternion_exponential
+/// @file glm/ext/quaternion_exponential.hpp
+///
+/// @defgroup ext_quaternion_exponential GLM_EXT_quaternion_exponential
+/// @ingroup ext
+///
+/// Provides exponential functions for quaternion types
+///
+/// Include <glm/ext/quaternion_exponential.hpp> to use the features of this extension.
+///
+/// @see core_exponential
+/// @see ext_quaternion_float
+/// @see ext_quaternion_double
+
+#pragma once
+
+// Dependency:
+#include "../common.hpp"
+#include "../trigonometric.hpp"
+#include "../geometric.hpp"
+#include "../ext/scalar_constants.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_exponential extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_transform
+ /// @{
+
+ /// Returns a exponential of a quaternion.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> exp(qua<T, Q> const& q);
+
+ /// Returns a logarithm of a quaternion
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> log(qua<T, Q> const& q);
+
+ /// Returns a quaternion raised to a power.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> pow(qua<T, Q> const& q, T y);
+
+ /// Returns the square root of a quaternion
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> sqrt(qua<T, Q> const& q);
+
+ /// @}
+} //namespace glm
+
+#include "quaternion_exponential.inl"
diff --git a/src/include/glm/ext/quaternion_exponential.inl b/src/include/glm/ext/quaternion_exponential.inl
new file mode 100644
index 0000000..7f063e0
--- /dev/null
+++ b/src/include/glm/ext/quaternion_exponential.inl
@@ -0,0 +1,85 @@
+#include "scalar_constants.hpp"
+
+namespace glm
+{
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> exp(qua<T, Q> const& q)
+ {
+ vec<3, T, Q> u(q.x, q.y, q.z);
+ T const Angle = glm::length(u);
+ if (Angle < epsilon<T>())
+ return qua<T, Q>();
+
+ vec<3, T, Q> const v(u / Angle);
+ return qua<T, Q>(cos(Angle), sin(Angle) * v);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> log(qua<T, Q> const& q)
+ {
+ vec<3, T, Q> u(q.x, q.y, q.z);
+ T Vec3Len = length(u);
+
+ if (Vec3Len < epsilon<T>())
+ {
+ if(q.w > static_cast<T>(0))
+ return qua<T, Q>(log(q.w), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
+ else if(q.w < static_cast<T>(0))
+ return qua<T, Q>(log(-q.w), pi<T>(), static_cast<T>(0), static_cast<T>(0));
+ else
+ return qua<T, Q>(std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity());
+ }
+ else
+ {
+ T t = atan(Vec3Len, T(q.w)) / Vec3Len;
+ T QuatLen2 = Vec3Len * Vec3Len + q.w * q.w;
+ return qua<T, Q>(static_cast<T>(0.5) * log(QuatLen2), t * q.x, t * q.y, t * q.z);
+ }
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> pow(qua<T, Q> const& x, T y)
+ {
+ //Raising to the power of 0 should yield 1
+ //Needed to prevent a division by 0 error later on
+ if(y > -epsilon<T>() && y < epsilon<T>())
+ return qua<T, Q>(1,0,0,0);
+
+ //To deal with non-unit quaternions
+ T magnitude = sqrt(x.x * x.x + x.y * x.y + x.z * x.z + x.w *x.w);
+
+ T Angle;
+ if(abs(x.w / magnitude) > cos_one_over_two<T>())
+ {
+ //Scalar component is close to 1; using it to recover angle would lose precision
+ //Instead, we use the non-scalar components since sin() is accurate around 0
+
+ //Prevent a division by 0 error later on
+ T VectorMagnitude = x.x * x.x + x.y * x.y + x.z * x.z;
+ if (glm::abs(VectorMagnitude - static_cast<T>(0)) < glm::epsilon<T>()) {
+ //Equivalent to raising a real number to a power
+ return qua<T, Q>(pow(x.w, y), 0, 0, 0);
+ }
+
+ Angle = asin(sqrt(VectorMagnitude) / magnitude);
+ }
+ else
+ {
+ //Scalar component is small, shouldn't cause loss of precision
+ Angle = acos(x.w / magnitude);
+ }
+
+ T NewAngle = Angle * y;
+ T Div = sin(NewAngle) / sin(Angle);
+ T Mag = pow(magnitude, y - static_cast<T>(1));
+ return qua<T, Q>(cos(NewAngle) * magnitude * Mag, x.x * Div * Mag, x.y * Div * Mag, x.z * Div * Mag);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> sqrt(qua<T, Q> const& x)
+ {
+ return pow(x, static_cast<T>(0.5));
+ }
+}//namespace glm
+
+
diff --git a/src/include/glm/ext/quaternion_float.hpp b/src/include/glm/ext/quaternion_float.hpp
new file mode 100644
index 0000000..1c41530
--- /dev/null
+++ b/src/include/glm/ext/quaternion_float.hpp
@@ -0,0 +1,39 @@
+/// @ref ext_quaternion_float
+/// @file glm/ext/quaternion_float.hpp
+///
+/// @defgroup ext_quaternion_float GLM_EXT_quaternion_float
+/// @ingroup ext
+///
+/// Exposes single-precision floating point quaternion type.
+///
+/// Include <glm/ext/quaternion_float.hpp> to use the features of this extension.
+///
+/// @see ext_quaternion_double
+/// @see ext_quaternion_float_precision
+/// @see ext_quaternion_common
+/// @see ext_quaternion_exponential
+/// @see ext_quaternion_geometric
+/// @see ext_quaternion_relational
+/// @see ext_quaternion_transform
+/// @see ext_quaternion_trigonometric
+
+#pragma once
+
+// Dependency:
+#include "../detail/type_quat.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_float extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_float
+ /// @{
+
+ /// Quaternion of single-precision floating-point numbers.
+ typedef qua<float, defaultp> quat;
+
+ /// @}
+} //namespace glm
+
diff --git a/src/include/glm/ext/quaternion_float_precision.hpp b/src/include/glm/ext/quaternion_float_precision.hpp
new file mode 100644
index 0000000..0990aea
--- /dev/null
+++ b/src/include/glm/ext/quaternion_float_precision.hpp
@@ -0,0 +1,36 @@
+/// @ref ext_quaternion_float_precision
+/// @file glm/ext/quaternion_float_precision.hpp
+///
+/// @defgroup ext_quaternion_float_precision GLM_EXT_quaternion_float_precision
+/// @ingroup ext
+///
+/// Exposes single-precision floating point quaternion type with various precision in term of ULPs.
+///
+/// Include <glm/ext/quaternion_float_precision.hpp> to use the features of this extension.
+
+#pragma once
+
+// Dependency:
+#include "../detail/type_quat.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_float_precision extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_float_precision
+ /// @{
+
+ /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ typedef qua<float, lowp> lowp_quat;
+
+ /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ typedef qua<float, mediump> mediump_quat;
+
+ /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ typedef qua<float, highp> highp_quat;
+
+ /// @}
+} //namespace glm
+
diff --git a/src/include/glm/ext/quaternion_geometric.hpp b/src/include/glm/ext/quaternion_geometric.hpp
new file mode 100644
index 0000000..422ea66
--- /dev/null
+++ b/src/include/glm/ext/quaternion_geometric.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_quaternion_geometric
+/// @file glm/ext/quaternion_geometric.hpp
+///
+/// @defgroup ext_quaternion_geometric GLM_EXT_quaternion_geometric
+/// @ingroup ext
+///
+/// Provides geometric functions for quaternion types
+///
+/// Include <glm/ext/quaternion_geometric.hpp> to use the features of this extension.
+///
+/// @see core_geometric
+/// @see ext_quaternion_float
+/// @see ext_quaternion_double
+
+#pragma once
+
+// Dependency:
+#include "../geometric.hpp"
+#include "../exponential.hpp"
+#include "../ext/vector_relational.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_geometric extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_geometric
+ /// @{
+
+ /// Returns the norm of a quaternions
+ ///
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_quaternion_geometric
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL T length(qua<T, Q> const& q);
+
+ /// Returns the normalized quaternion.
+ ///
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_quaternion_geometric
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> normalize(qua<T, Q> const& q);
+
+ /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...
+ ///
+ /// @tparam T Floating-point scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_quaternion_geometric
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL T dot(qua<T, Q> const& x, qua<T, Q> const& y);
+
+ /// Compute a cross product.
+ ///
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_quaternion_geometric
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> cross(qua<T, Q> const& q1, qua<T, Q> const& q2);
+
+ /// @}
+} //namespace glm
+
+#include "quaternion_geometric.inl"
diff --git a/src/include/glm/ext/quaternion_geometric.inl b/src/include/glm/ext/quaternion_geometric.inl
new file mode 100644
index 0000000..da4e9f4
--- /dev/null
+++ b/src/include/glm/ext/quaternion_geometric.inl
@@ -0,0 +1,36 @@
+namespace glm
+{
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER T dot(qua<T, Q> const& x, qua<T, Q> const& y)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' accepts only floating-point inputs");
+ return detail::compute_dot<qua<T, Q>, T, detail::is_aligned<Q>::value>::call(x, y);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER T length(qua<T, Q> const& q)
+ {
+ return glm::sqrt(dot(q, q));
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> normalize(qua<T, Q> const& q)
+ {
+ T len = length(q);
+ if(len <= static_cast<T>(0)) // Problem
+ return qua<T, Q>(static_cast<T>(1), static_cast<T>(0), static_cast<T>(0), static_cast<T>(0));
+ T oneOverLen = static_cast<T>(1) / len;
+ return qua<T, Q>(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> cross(qua<T, Q> const& q1, qua<T, Q> const& q2)
+ {
+ return qua<T, Q>(
+ q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z,
+ q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y,
+ q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z,
+ q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x);
+ }
+}//namespace glm
+
diff --git a/src/include/glm/ext/quaternion_relational.hpp b/src/include/glm/ext/quaternion_relational.hpp
new file mode 100644
index 0000000..38504c9
--- /dev/null
+++ b/src/include/glm/ext/quaternion_relational.hpp
@@ -0,0 +1,62 @@
+/// @ref ext_quaternion_relational
+/// @file glm/ext/quaternion_relational.hpp
+///
+/// @defgroup ext_quaternion_relational GLM_EXT_quaternion_relational
+/// @ingroup ext
+///
+/// Exposes comparison functions for quaternion types that take a user defined epsilon values.
+///
+/// Include <glm/ext/quaternion_relational.hpp> to use the features of this extension.
+///
+/// @see core_vector_relational
+/// @see ext_vector_relational
+/// @see ext_matrix_relational
+/// @see ext_quaternion_float
+/// @see ext_quaternion_double
+
+#pragma once
+
+// Dependency:
+#include "../vector_relational.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_relational extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_relational
+ /// @{
+
+ /// Returns the component-wise comparison of result x == y.
+ ///
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y);
+
+ /// Returns the component-wise comparison of |x - y| < epsilon.
+ ///
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon);
+
+ /// Returns the component-wise comparison of result x != y.
+ ///
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y);
+
+ /// Returns the component-wise comparison of |x - y| >= epsilon.
+ ///
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon);
+
+ /// @}
+} //namespace glm
+
+#include "quaternion_relational.inl"
diff --git a/src/include/glm/ext/quaternion_relational.inl b/src/include/glm/ext/quaternion_relational.inl
new file mode 100644
index 0000000..e6802ed
--- /dev/null
+++ b/src/include/glm/ext/quaternion_relational.inl
@@ -0,0 +1,35 @@
+namespace glm
+{
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y)
+ {
+ vec<4, bool, Q> Result;
+ for(length_t i = 0; i < x.length(); ++i)
+ Result[i] = x[i] == y[i];
+ return Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon)
+ {
+ vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
+ return lessThan(abs(v), vec<4, T, Q>(epsilon));
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y)
+ {
+ vec<4, bool, Q> Result;
+ for(length_t i = 0; i < x.length(); ++i)
+ Result[i] = x[i] != y[i];
+ return Result;
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua<T, Q> const& x, qua<T, Q> const& y, T epsilon)
+ {
+ vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
+ return greaterThanEqual(abs(v), vec<4, T, Q>(epsilon));
+ }
+}//namespace glm
+
diff --git a/src/include/glm/ext/quaternion_transform.hpp b/src/include/glm/ext/quaternion_transform.hpp
new file mode 100644
index 0000000..7b5d7bd
--- /dev/null
+++ b/src/include/glm/ext/quaternion_transform.hpp
@@ -0,0 +1,47 @@
+/// @ref ext_quaternion_transform
+/// @file glm/ext/quaternion_transform.hpp
+///
+/// @defgroup ext_quaternion_transform GLM_EXT_quaternion_transform
+/// @ingroup ext
+///
+/// Provides transformation functions for quaternion types
+///
+/// Include <glm/ext/quaternion_transform.hpp> to use the features of this extension.
+///
+/// @see ext_quaternion_float
+/// @see ext_quaternion_double
+/// @see ext_quaternion_exponential
+/// @see ext_quaternion_geometric
+/// @see ext_quaternion_relational
+/// @see ext_quaternion_trigonometric
+
+#pragma once
+
+// Dependency:
+#include "../common.hpp"
+#include "../trigonometric.hpp"
+#include "../geometric.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_transform extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_transform
+ /// @{
+
+ /// Rotates a quaternion from a vector of 3 components axis and an angle.
+ ///
+ /// @param q Source orientation
+ /// @param angle Angle expressed in radians.
+ /// @param axis Axis of the rotation
+ ///
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> rotate(qua<T, Q> const& q, T const& angle, vec<3, T, Q> const& axis);
+ /// @}
+} //namespace glm
+
+#include "quaternion_transform.inl"
diff --git a/src/include/glm/ext/quaternion_transform.inl b/src/include/glm/ext/quaternion_transform.inl
new file mode 100644
index 0000000..4191b52
--- /dev/null
+++ b/src/include/glm/ext/quaternion_transform.inl
@@ -0,0 +1,24 @@
+namespace glm
+{
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> rotate(qua<T, Q> const& q, T const& angle, vec<3, T, Q> const& v)
+ {
+ vec<3, T, Q> Tmp = v;
+
+ // Axis of rotation must be normalised
+ T len = glm::length(Tmp);
+ if(abs(len - static_cast<T>(1)) > static_cast<T>(0.001))
+ {
+ T oneOverLen = static_cast<T>(1) / len;
+ Tmp.x *= oneOverLen;
+ Tmp.y *= oneOverLen;
+ Tmp.z *= oneOverLen;
+ }
+
+ T const AngleRad(angle);
+ T const Sin = sin(AngleRad * static_cast<T>(0.5));
+
+ return q * qua<T, Q>(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);
+ }
+}//namespace glm
+
diff --git a/src/include/glm/ext/quaternion_trigonometric.hpp b/src/include/glm/ext/quaternion_trigonometric.hpp
new file mode 100644
index 0000000..08a6c05
--- /dev/null
+++ b/src/include/glm/ext/quaternion_trigonometric.hpp
@@ -0,0 +1,63 @@
+/// @ref ext_quaternion_trigonometric
+/// @file glm/ext/quaternion_trigonometric.hpp
+///
+/// @defgroup ext_quaternion_trigonometric GLM_EXT_quaternion_trigonometric
+/// @ingroup ext
+///
+/// Provides trigonometric functions for quaternion types
+///
+/// Include <glm/ext/quaternion_trigonometric.hpp> to use the features of this extension.
+///
+/// @see ext_quaternion_float
+/// @see ext_quaternion_double
+/// @see ext_quaternion_exponential
+/// @see ext_quaternion_geometric
+/// @see ext_quaternion_relational
+/// @see ext_quaternion_transform
+
+#pragma once
+
+// Dependency:
+#include "../trigonometric.hpp"
+#include "../exponential.hpp"
+#include "scalar_constants.hpp"
+#include "vector_relational.hpp"
+#include <limits>
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_quaternion_trigonometric extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_quaternion_trigonometric
+ /// @{
+
+ /// Returns the quaternion rotation angle.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL T angle(qua<T, Q> const& x);
+
+ /// Returns the q rotation axis.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL vec<3, T, Q> axis(qua<T, Q> const& x);
+
+ /// Build a quaternion from an angle and a normalized axis.
+ ///
+ /// @param angle Angle expressed in radians.
+ /// @param axis Axis of the quaternion, must be normalized.
+ ///
+ /// @tparam T A floating-point scalar type
+ /// @tparam Q A value from qualifier enum
+ template<typename T, qualifier Q>
+ GLM_FUNC_DECL qua<T, Q> angleAxis(T const& angle, vec<3, T, Q> const& axis);
+
+ /// @}
+} //namespace glm
+
+#include "quaternion_trigonometric.inl"
diff --git a/src/include/glm/ext/quaternion_trigonometric.inl b/src/include/glm/ext/quaternion_trigonometric.inl
new file mode 100644
index 0000000..d229d8d
--- /dev/null
+++ b/src/include/glm/ext/quaternion_trigonometric.inl
@@ -0,0 +1,34 @@
+#include "scalar_constants.hpp"
+
+namespace glm
+{
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER T angle(qua<T, Q> const& x)
+ {
+ if (abs(x.w) > cos_one_over_two<T>())
+ {
+ return asin(sqrt(x.x * x.x + x.y * x.y + x.z * x.z)) * static_cast<T>(2);
+ }
+
+ return acos(x.w) * static_cast<T>(2);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<3, T, Q> axis(qua<T, Q> const& x)
+ {
+ T const tmp1 = static_cast<T>(1) - x.w * x.w;
+ if(tmp1 <= static_cast<T>(0))
+ return vec<3, T, Q>(0, 0, 1);
+ T const tmp2 = static_cast<T>(1) / sqrt(tmp1);
+ return vec<3, T, Q>(x.x * tmp2, x.y * tmp2, x.z * tmp2);
+ }
+
+ template<typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER qua<T, Q> angleAxis(T const& angle, vec<3, T, Q> const& v)
+ {
+ T const a(angle);
+ T const s = glm::sin(a * static_cast<T>(0.5));
+
+ return qua<T, Q>(glm::cos(a * static_cast<T>(0.5)), v * s);
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/scalar_common.hpp b/src/include/glm/ext/scalar_common.hpp
new file mode 100644
index 0000000..0de59c9
--- /dev/null
+++ b/src/include/glm/ext/scalar_common.hpp
@@ -0,0 +1,157 @@
+/// @ref ext_scalar_common
+/// @file glm/ext/scalar_common.hpp
+///
+/// @defgroup ext_scalar_common GLM_EXT_scalar_common
+/// @ingroup ext
+///
+/// Exposes min and max functions for 3 to 4 scalar parameters.
+///
+/// Include <glm/ext/scalar_common.hpp> to use the features of this extension.
+///
+/// @see core_func_common
+/// @see ext_vector_common
+
+#pragma once
+
+// Dependency:
+#include "../common.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_scalar_common extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_scalar_common
+ /// @{
+
+ /// Returns the minimum component-wise values of 3 inputs
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T min(T a, T b, T c);
+
+ /// Returns the minimum component-wise values of 4 inputs
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T min(T a, T b, T c, T d);
+
+ /// Returns the maximum component-wise values of 3 inputs
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T max(T a, T b, T c);
+
+ /// Returns the maximum component-wise values of 4 inputs
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T max(T a, T b, T c, T d);
+
+ /// Returns the minimum component-wise values of 2 inputs. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a>
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T fmin(T a, T b);
+
+ /// Returns the minimum component-wise values of 3 inputs. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a>
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T fmin(T a, T b, T c);
+
+ /// Returns the minimum component-wise values of 4 inputs. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a>
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T fmin(T a, T b, T c, T d);
+
+ /// Returns the maximum component-wise values of 2 inputs. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T fmax(T a, T b);
+
+ /// Returns the maximum component-wise values of 3 inputs. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T fmax(T a, T b, T C);
+
+ /// Returns the maximum component-wise values of 4 inputs. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam T A floating-point scalar type.
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
+ /// @see ext_scalar_common
+ template<typename T>
+ GLM_FUNC_DECL T fmax(T a, T b, T C, T D);
+
+ /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam genType Floating-point scalar types.
+ ///
+ /// @see ext_scalar_common
+ template<typename genType>
+ GLM_FUNC_DECL genType fclamp(genType x, genType minVal, genType maxVal);
+
+ /// Simulate GL_CLAMP OpenGL wrap mode
+ ///
+ /// @tparam genType Floating-point scalar types.
+ ///
+ /// @see ext_scalar_common extension.
+ template<typename genType>
+ GLM_FUNC_DECL genType clamp(genType const& Texcoord);
+
+ /// Simulate GL_REPEAT OpenGL wrap mode
+ ///
+ /// @tparam genType Floating-point scalar types.
+ ///
+ /// @see ext_scalar_common extension.
+ template<typename genType>
+ GLM_FUNC_DECL genType repeat(genType const& Texcoord);
+
+ /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode
+ ///
+ /// @tparam genType Floating-point scalar types.
+ ///
+ /// @see ext_scalar_common extension.
+ template<typename genType>
+ GLM_FUNC_DECL genType mirrorClamp(genType const& Texcoord);
+
+ /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode
+ ///
+ /// @tparam genType Floating-point scalar types.
+ ///
+ /// @see ext_scalar_common extension.
+ template<typename genType>
+ GLM_FUNC_DECL genType mirrorRepeat(genType const& Texcoord);
+
+ /// @}
+}//namespace glm
+
+#include "scalar_common.inl"
diff --git a/src/include/glm/ext/scalar_common.inl b/src/include/glm/ext/scalar_common.inl
new file mode 100644
index 0000000..53de033
--- /dev/null
+++ b/src/include/glm/ext/scalar_common.inl
@@ -0,0 +1,152 @@
+namespace glm
+{
+ template<typename T>
+ GLM_FUNC_QUALIFIER T min(T a, T b, T c)
+ {
+ return glm::min(glm::min(a, b), c);
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T min(T a, T b, T c, T d)
+ {
+ return glm::min(glm::min(a, b), glm::min(c, d));
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T max(T a, T b, T c)
+ {
+ return glm::max(glm::max(a, b), c);
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T max(T a, T b, T c, T d)
+ {
+ return glm::max(glm::max(a, b), glm::max(c, d));
+ }
+
+# if GLM_HAS_CXX11_STL
+ using std::fmin;
+# else
+ template<typename T>
+ GLM_FUNC_QUALIFIER T fmin(T a, T b)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmin' only accept floating-point input");
+
+ if (isnan(a))
+ return b;
+ return min(a, b);
+ }
+# endif
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T fmin(T a, T b, T c)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmin' only accept floating-point input");
+
+ if (isnan(a))
+ return fmin(b, c);
+ if (isnan(b))
+ return fmin(a, c);
+ if (isnan(c))
+ return min(a, b);
+ return min(a, b, c);
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T fmin(T a, T b, T c, T d)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmin' only accept floating-point input");
+
+ if (isnan(a))
+ return fmin(b, c, d);
+ if (isnan(b))
+ return min(a, fmin(c, d));
+ if (isnan(c))
+ return fmin(min(a, b), d);
+ if (isnan(d))
+ return min(a, b, c);
+ return min(a, b, c, d);
+ }
+
+
+# if GLM_HAS_CXX11_STL
+ using std::fmax;
+# else
+ template<typename T>
+ GLM_FUNC_QUALIFIER T fmax(T a, T b)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmax' only accept floating-point input");
+
+ if (isnan(a))
+ return b;
+ return max(a, b);
+ }
+# endif
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T fmax(T a, T b, T c)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmax' only accept floating-point input");
+
+ if (isnan(a))
+ return fmax(b, c);
+ if (isnan(b))
+ return fmax(a, c);
+ if (isnan(c))
+ return max(a, b);
+ return max(a, b, c);
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T fmax(T a, T b, T c, T d)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmax' only accept floating-point input");
+
+ if (isnan(a))
+ return fmax(b, c, d);
+ if (isnan(b))
+ return max(a, fmax(c, d));
+ if (isnan(c))
+ return fmax(max(a, b), d);
+ if (isnan(d))
+ return max(a, b, c);
+ return max(a, b, c, d);
+ }
+
+ // fclamp
+ template<typename genType>
+ GLM_FUNC_QUALIFIER genType fclamp(genType x, genType minVal, genType maxVal)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fclamp' only accept floating-point or integer inputs");
+ return fmin(fmax(x, minVal), maxVal);
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER genType clamp(genType const& Texcoord)
+ {
+ return glm::clamp(Texcoord, static_cast<genType>(0), static_cast<genType>(1));
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER genType repeat(genType const& Texcoord)
+ {
+ return glm::fract(Texcoord);
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER genType mirrorClamp(genType const& Texcoord)
+ {
+ return glm::fract(glm::abs(Texcoord));
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER genType mirrorRepeat(genType const& Texcoord)
+ {
+ genType const Abs = glm::abs(Texcoord);
+ genType const Clamp = glm::mod(glm::floor(Abs), static_cast<genType>(2));
+ genType const Floor = glm::floor(Abs);
+ genType const Rest = Abs - Floor;
+ genType const Mirror = Clamp + Rest;
+ return mix(Rest, static_cast<genType>(1) - Rest, Mirror >= static_cast<genType>(1));
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/scalar_constants.hpp b/src/include/glm/ext/scalar_constants.hpp
new file mode 100644
index 0000000..99d88ca
--- /dev/null
+++ b/src/include/glm/ext/scalar_constants.hpp
@@ -0,0 +1,40 @@
+/// @ref ext_scalar_constants
+/// @file glm/ext/scalar_constants.hpp
+///
+/// @defgroup ext_scalar_constants GLM_EXT_scalar_constants
+/// @ingroup ext
+///
+/// Provides a list of constants and precomputed useful values.
+///
+/// Include <glm/ext/scalar_constants.hpp> to use the features of this extension.
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_scalar_constants extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_scalar_constants
+ /// @{
+
+ /// Return the epsilon constant for floating point types.
+ template<typename genType>
+ GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon();
+
+ /// Return the pi constant for floating point types.
+ template<typename genType>
+ GLM_FUNC_DECL GLM_CONSTEXPR genType pi();
+
+ /// Return the value of cos(1 / 2) for floating point types.
+ template<typename genType>
+ GLM_FUNC_DECL GLM_CONSTEXPR genType cos_one_over_two();
+
+ /// @}
+} //namespace glm
+
+#include "scalar_constants.inl"
diff --git a/src/include/glm/ext/scalar_constants.inl b/src/include/glm/ext/scalar_constants.inl
new file mode 100644
index 0000000..4ce9f21
--- /dev/null
+++ b/src/include/glm/ext/scalar_constants.inl
@@ -0,0 +1,24 @@
+#include <limits>
+
+namespace glm
+{
+ template<typename genType>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon()
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'epsilon' only accepts floating-point inputs");
+ return std::numeric_limits<genType>::epsilon();
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi()
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'pi' only accepts floating-point inputs");
+ return static_cast<genType>(3.14159265358979323846264338327950288);
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType cos_one_over_two()
+ {
+ return genType(0.877582561890372716130286068203503191);
+ }
+} //namespace glm
diff --git a/src/include/glm/ext/scalar_int_sized.hpp b/src/include/glm/ext/scalar_int_sized.hpp
new file mode 100644
index 0000000..af57a30
--- /dev/null
+++ b/src/include/glm/ext/scalar_int_sized.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_scalar_int_sized
+/// @file glm/ext/scalar_int_sized.hpp
+///
+/// @defgroup ext_scalar_int_sized GLM_EXT_scalar_int_sized
+/// @ingroup ext
+///
+/// Exposes sized signed integer scalar types.
+///
+/// Include <glm/ext/scalar_int_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_uint_sized
+
+#pragma once
+
+#include "../detail/setup.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_scalar_int_sized extension included")
+#endif
+
+namespace glm{
+namespace detail
+{
+# if GLM_HAS_EXTENDED_INTEGER_TYPE
+ typedef std::int8_t int8;
+ typedef std::int16_t int16;
+ typedef std::int32_t int32;
+# else
+ typedef signed char int8;
+ typedef signed short int16;
+ typedef signed int int32;
+#endif//
+
+ template<>
+ struct is_int<int8>
+ {
+ enum test {value = ~0};
+ };
+
+ template<>
+ struct is_int<int16>
+ {
+ enum test {value = ~0};
+ };
+
+ template<>
+ struct is_int<int64>
+ {
+ enum test {value = ~0};
+ };
+}//namespace detail
+
+
+ /// @addtogroup ext_scalar_int_sized
+ /// @{
+
+ /// 8 bit signed integer type.
+ typedef detail::int8 int8;
+
+ /// 16 bit signed integer type.
+ typedef detail::int16 int16;
+
+ /// 32 bit signed integer type.
+ typedef detail::int32 int32;
+
+ /// 64 bit signed integer type.
+ typedef detail::int64 int64;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/scalar_integer.hpp b/src/include/glm/ext/scalar_integer.hpp
new file mode 100644
index 0000000..05b1b31
--- /dev/null
+++ b/src/include/glm/ext/scalar_integer.hpp
@@ -0,0 +1,92 @@
+/// @ref ext_scalar_integer
+/// @file glm/ext/scalar_integer.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_scalar_integer GLM_EXT_scalar_integer
+/// @ingroup ext
+///
+/// Include <glm/ext/scalar_integer.hpp> to use the features of this extension.
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/qualifier.hpp"
+#include "../detail/_vectorize.hpp"
+#include "../detail/type_float.hpp"
+#include "../vector_relational.hpp"
+#include "../common.hpp"
+#include <limits>
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_scalar_integer extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_scalar_integer
+ /// @{
+
+ /// Return true if the value is a power of two number.
+ ///
+ /// @see ext_scalar_integer
+ template<typename genIUType>
+ GLM_FUNC_DECL bool isPowerOfTwo(genIUType v);
+
+ /// Return the power of two number which value is just higher the input value,
+ /// round up to a power of two.
+ ///
+ /// @see ext_scalar_integer
+ template<typename genIUType>
+ GLM_FUNC_DECL genIUType nextPowerOfTwo(genIUType v);
+
+ /// Return the power of two number which value is just lower the input value,
+ /// round down to a power of two.
+ ///
+ /// @see ext_scalar_integer
+ template<typename genIUType>
+ GLM_FUNC_DECL genIUType prevPowerOfTwo(genIUType v);
+
+ /// Return true if the 'Value' is a multiple of 'Multiple'.
+ ///
+ /// @see ext_scalar_integer
+ template<typename genIUType>
+ GLM_FUNC_DECL bool isMultiple(genIUType v, genIUType Multiple);
+
+ /// Higher multiple number of Source.
+ ///
+ /// @tparam genIUType Integer scalar or vector types.
+ ///
+ /// @param v Source value to which is applied the function
+ /// @param Multiple Must be a null or positive value
+ ///
+ /// @see ext_scalar_integer
+ template<typename genIUType>
+ GLM_FUNC_DECL genIUType nextMultiple(genIUType v, genIUType Multiple);
+
+ /// Lower multiple number of Source.
+ ///
+ /// @tparam genIUType Integer scalar or vector types.
+ ///
+ /// @param v Source value to which is applied the function
+ /// @param Multiple Must be a null or positive value
+ ///
+ /// @see ext_scalar_integer
+ template<typename genIUType>
+ GLM_FUNC_DECL genIUType prevMultiple(genIUType v, genIUType Multiple);
+
+ /// Returns the bit number of the Nth significant bit set to
+ /// 1 in the binary representation of value.
+ /// If value bitcount is less than the Nth significant bit, -1 will be returned.
+ ///
+ /// @tparam genIUType Signed or unsigned integer scalar types.
+ ///
+ /// @see ext_scalar_integer
+ template<typename genIUType>
+ GLM_FUNC_DECL int findNSB(genIUType x, int significantBitCount);
+
+ /// @}
+} //namespace glm
+
+#include "scalar_integer.inl"
diff --git a/src/include/glm/ext/scalar_integer.inl b/src/include/glm/ext/scalar_integer.inl
new file mode 100644
index 0000000..0cc286f
--- /dev/null
+++ b/src/include/glm/ext/scalar_integer.inl
@@ -0,0 +1,243 @@
+#include "../integer.hpp"
+
+namespace glm{
+namespace detail
+{
+ template<length_t L, typename T, qualifier Q, bool compute = false>
+ struct compute_ceilShift
+ {
+ GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& v, T)
+ {
+ return v;
+ }
+ };
+
+ template<length_t L, typename T, qualifier Q>
+ struct compute_ceilShift<L, T, Q, true>
+ {
+ GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& v, T Shift)
+ {
+ return v | (v >> Shift);
+ }
+ };
+
+ template<length_t L, typename T, qualifier Q, bool isSigned = true>
+ struct compute_ceilPowerOfTwo
+ {
+ GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x)
+ {
+ GLM_STATIC_ASSERT(!std::numeric_limits<T>::is_iec559, "'ceilPowerOfTwo' only accept integer scalar or vector inputs");
+
+ vec<L, T, Q> const Sign(sign(x));
+
+ vec<L, T, Q> v(abs(x));
+
+ v = v - static_cast<T>(1);
+ v = v | (v >> static_cast<T>(1));
+ v = v | (v >> static_cast<T>(2));
+ v = v | (v >> static_cast<T>(4));
+ v = compute_ceilShift<L, T, Q, sizeof(T) >= 2>::call(v, 8);
+ v = compute_ceilShift<L, T, Q, sizeof(T) >= 4>::call(v, 16);
+ v = compute_ceilShift<L, T, Q, sizeof(T) >= 8>::call(v, 32);
+ return (v + static_cast<T>(1)) * Sign;
+ }
+ };
+
+ template<length_t L, typename T, qualifier Q>
+ struct compute_ceilPowerOfTwo<L, T, Q, false>
+ {
+ GLM_FUNC_QUALIFIER static vec<L, T, Q> call(vec<L, T, Q> const& x)
+ {
+ GLM_STATIC_ASSERT(!std::numeric_limits<T>::is_iec559, "'ceilPowerOfTwo' only accept integer scalar or vector inputs");
+
+ vec<L, T, Q> v(x);
+
+ v = v - static_cast<T>(1);
+ v = v | (v >> static_cast<T>(1));
+ v = v | (v >> static_cast<T>(2));
+ v = v | (v >> static_cast<T>(4));
+ v = compute_ceilShift<L, T, Q, sizeof(T) >= 2>::call(v, 8);
+ v = compute_ceilShift<L, T, Q, sizeof(T) >= 4>::call(v, 16);
+ v = compute_ceilShift<L, T, Q, sizeof(T) >= 8>::call(v, 32);
+ return v + static_cast<T>(1);
+ }
+ };
+
+ template<bool is_float, bool is_signed>
+ struct compute_ceilMultiple{};
+
+ template<>
+ struct compute_ceilMultiple<true, true>
+ {
+ template<typename genType>
+ GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+ {
+ if(Source > genType(0))
+ return Source + (Multiple - std::fmod(Source, Multiple));
+ else
+ return Source + std::fmod(-Source, Multiple);
+ }
+ };
+
+ template<>
+ struct compute_ceilMultiple<false, false>
+ {
+ template<typename genType>
+ GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+ {
+ genType Tmp = Source - genType(1);
+ return Tmp + (Multiple - (Tmp % Multiple));
+ }
+ };
+
+ template<>
+ struct compute_ceilMultiple<false, true>
+ {
+ template<typename genType>
+ GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+ {
+ assert(Multiple > genType(0));
+ if(Source > genType(0))
+ {
+ genType Tmp = Source - genType(1);
+ return Tmp + (Multiple - (Tmp % Multiple));
+ }
+ else
+ return Source + (-Source % Multiple);
+ }
+ };
+
+ template<bool is_float, bool is_signed>
+ struct compute_floorMultiple{};
+
+ template<>
+ struct compute_floorMultiple<true, true>
+ {
+ template<typename genType>
+ GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+ {
+ if(Source >= genType(0))
+ return Source - std::fmod(Source, Multiple);
+ else
+ return Source - std::fmod(Source, Multiple) - Multiple;
+ }
+ };
+
+ template<>
+ struct compute_floorMultiple<false, false>
+ {
+ template<typename genType>
+ GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+ {
+ if(Source >= genType(0))
+ return Source - Source % Multiple;
+ else
+ {
+ genType Tmp = Source + genType(1);
+ return Tmp - Tmp % Multiple - Multiple;
+ }
+ }
+ };
+
+ template<>
+ struct compute_floorMultiple<false, true>
+ {
+ template<typename genType>
+ GLM_FUNC_QUALIFIER static genType call(genType Source, genType Multiple)
+ {
+ if(Source >= genType(0))
+ return Source - Source % Multiple;
+ else
+ {
+ genType Tmp = Source + genType(1);
+ return Tmp - Tmp % Multiple - Multiple;
+ }
+ }
+ };
+}//namespace detail
+
+ template<typename genIUType>
+ GLM_FUNC_QUALIFIER bool isPowerOfTwo(genIUType Value)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'isPowerOfTwo' only accept integer inputs");
+
+ genIUType const Result = glm::abs(Value);
+ return !(Result & (Result - 1));
+ }
+
+ template<typename genIUType>
+ GLM_FUNC_QUALIFIER genIUType nextPowerOfTwo(genIUType value)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'nextPowerOfTwo' only accept integer inputs");
+
+ return detail::compute_ceilPowerOfTwo<1, genIUType, defaultp, std::numeric_limits<genIUType>::is_signed>::call(vec<1, genIUType, defaultp>(value)).x;
+ }
+
+ template<typename genIUType>
+ GLM_FUNC_QUALIFIER genIUType prevPowerOfTwo(genIUType value)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'prevPowerOfTwo' only accept integer inputs");
+
+ return isPowerOfTwo(value) ? value : static_cast<genIUType>(static_cast<genIUType>(1) << static_cast<genIUType>(findMSB(value)));
+ }
+
+ template<typename genIUType>
+ GLM_FUNC_QUALIFIER bool isMultiple(genIUType Value, genIUType Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'isMultiple' only accept integer inputs");
+
+ return isMultiple(vec<1, genIUType>(Value), vec<1, genIUType>(Multiple)).x;
+ }
+
+ template<typename genIUType>
+ GLM_FUNC_QUALIFIER genIUType nextMultiple(genIUType Source, genIUType Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'nextMultiple' only accept integer inputs");
+
+ return detail::compute_ceilMultiple<std::numeric_limits<genIUType>::is_iec559, std::numeric_limits<genIUType>::is_signed>::call(Source, Multiple);
+ }
+
+ template<typename genIUType>
+ GLM_FUNC_QUALIFIER genIUType prevMultiple(genIUType Source, genIUType Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'prevMultiple' only accept integer inputs");
+
+ return detail::compute_floorMultiple<std::numeric_limits<genIUType>::is_iec559, std::numeric_limits<genIUType>::is_signed>::call(Source, Multiple);
+ }
+
+ template<typename genIUType>
+ GLM_FUNC_QUALIFIER int findNSB(genIUType x, int significantBitCount)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'findNSB' only accept integer inputs");
+
+ if(bitCount(x) < significantBitCount)
+ return -1;
+
+ genIUType const One = static_cast<genIUType>(1);
+ int bitPos = 0;
+
+ genIUType key = x;
+ int nBitCount = significantBitCount;
+ int Step = sizeof(x) * 8 / 2;
+ while (key > One)
+ {
+ genIUType Mask = static_cast<genIUType>((One << Step) - One);
+ genIUType currentKey = key & Mask;
+ int currentBitCount = bitCount(currentKey);
+ if (nBitCount > currentBitCount)
+ {
+ nBitCount -= currentBitCount;
+ bitPos += Step;
+ key >>= static_cast<genIUType>(Step);
+ }
+ else
+ {
+ key = key & Mask;
+ }
+
+ Step >>= 1;
+ }
+
+ return static_cast<int>(bitPos);
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/scalar_packing.hpp b/src/include/glm/ext/scalar_packing.hpp
new file mode 100644
index 0000000..4ebaa08
--- /dev/null
+++ b/src/include/glm/ext/scalar_packing.hpp
@@ -0,0 +1,32 @@
+/// @ref ext_scalar_packing
+/// @file glm/ext/scalar_packing.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_scalar_packing GLM_EXT_scalar_packing
+/// @ingroup ext
+///
+/// Include <glm/ext/scalar_packing.hpp> to use the features of this extension.
+///
+/// This extension provides a set of function to convert scalar values to packed
+/// formats.
+
+#pragma once
+
+// Dependency:
+#include "../detail/qualifier.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_scalar_packing extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_scalar_packing
+ /// @{
+
+
+ /// @}
+}// namespace glm
+
+#include "scalar_packing.inl"
diff --git a/src/include/glm/ext/scalar_packing.inl b/src/include/glm/ext/scalar_packing.inl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/include/glm/ext/scalar_packing.inl
diff --git a/src/include/glm/ext/scalar_relational.hpp b/src/include/glm/ext/scalar_relational.hpp
new file mode 100644
index 0000000..af16a3f
--- /dev/null
+++ b/src/include/glm/ext/scalar_relational.hpp
@@ -0,0 +1,65 @@
+/// @ref ext_scalar_relational
+/// @file glm/ext/scalar_relational.hpp
+///
+/// @defgroup ext_scalar_relational GLM_EXT_scalar_relational
+/// @ingroup ext
+///
+/// Exposes comparison functions for scalar types that take a user defined epsilon values.
+///
+/// Include <glm/ext/scalar_relational.hpp> to use the features of this extension.
+///
+/// @see core_vector_relational
+/// @see ext_vector_relational
+/// @see ext_matrix_relational
+
+#pragma once
+
+// Dependencies
+#include "../detail/qualifier.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_scalar_relational extension included")
+#endif
+
+namespace glm
+{
+ /// Returns the component-wise comparison of |x - y| < epsilon.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam genType Floating-point or integer scalar types
+ template<typename genType>
+ GLM_FUNC_DECL GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon);
+
+ /// Returns the component-wise comparison of |x - y| >= epsilon.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam genType Floating-point or integer scalar types
+ template<typename genType>
+ GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon);
+
+ /// Returns the component-wise comparison between two scalars in term of ULPs.
+ /// True if this expression is satisfied.
+ ///
+ /// @param x First operand.
+ /// @param y Second operand.
+ /// @param ULPs Maximum difference in ULPs between the two operators to consider them equal.
+ ///
+ /// @tparam genType Floating-point or integer scalar types
+ template<typename genType>
+ GLM_FUNC_DECL GLM_CONSTEXPR bool equal(genType const& x, genType const& y, int ULPs);
+
+ /// Returns the component-wise comparison between two scalars in term of ULPs.
+ /// True if this expression is not satisfied.
+ ///
+ /// @param x First operand.
+ /// @param y Second operand.
+ /// @param ULPs Maximum difference in ULPs between the two operators to consider them not equal.
+ ///
+ /// @tparam genType Floating-point or integer scalar types
+ template<typename genType>
+ GLM_FUNC_DECL GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, int ULPs);
+
+ /// @}
+}//namespace glm
+
+#include "scalar_relational.inl"
diff --git a/src/include/glm/ext/scalar_relational.inl b/src/include/glm/ext/scalar_relational.inl
new file mode 100644
index 0000000..69157ca
--- /dev/null
+++ b/src/include/glm/ext/scalar_relational.inl
@@ -0,0 +1,40 @@
+#include "../common.hpp"
+#include "../ext/scalar_int_sized.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+#include "../detail/type_float.hpp"
+
+namespace glm
+{
+ template<typename genType>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon)
+ {
+ return abs(x - y) <= epsilon;
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon)
+ {
+ return abs(x - y) > epsilon;
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, int MaxULPs)
+ {
+ detail::float_t<genType> const a(x);
+ detail::float_t<genType> const b(y);
+
+ // Different signs means they do not match.
+ if(a.negative() != b.negative())
+ return false;
+
+ // Find the difference in ULPs.
+ typename detail::float_t<genType>::int_type const DiffULPs = abs(a.i - b.i);
+ return DiffULPs <= MaxULPs;
+ }
+
+ template<typename genType>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, int ULPs)
+ {
+ return !equal(x, y, ULPs);
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/scalar_uint_sized.hpp b/src/include/glm/ext/scalar_uint_sized.hpp
new file mode 100644
index 0000000..6d7386a
--- /dev/null
+++ b/src/include/glm/ext/scalar_uint_sized.hpp
@@ -0,0 +1,70 @@
+/// @ref ext_scalar_uint_sized
+/// @file glm/ext/scalar_uint_sized.hpp
+///
+/// @defgroup ext_scalar_uint_sized GLM_EXT_scalar_uint_sized
+/// @ingroup ext
+///
+/// Exposes sized unsigned integer scalar types.
+///
+/// Include <glm/ext/scalar_uint_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_int_sized
+
+#pragma once
+
+#include "../detail/setup.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_scalar_uint_sized extension included")
+#endif
+
+namespace glm{
+namespace detail
+{
+# if GLM_HAS_EXTENDED_INTEGER_TYPE
+ typedef std::uint8_t uint8;
+ typedef std::uint16_t uint16;
+ typedef std::uint32_t uint32;
+# else
+ typedef unsigned char uint8;
+ typedef unsigned short uint16;
+ typedef unsigned int uint32;
+#endif
+
+ template<>
+ struct is_int<uint8>
+ {
+ enum test {value = ~0};
+ };
+
+ template<>
+ struct is_int<uint16>
+ {
+ enum test {value = ~0};
+ };
+
+ template<>
+ struct is_int<uint64>
+ {
+ enum test {value = ~0};
+ };
+}//namespace detail
+
+
+ /// @addtogroup ext_scalar_uint_sized
+ /// @{
+
+ /// 8 bit unsigned integer type.
+ typedef detail::uint8 uint8;
+
+ /// 16 bit unsigned integer type.
+ typedef detail::uint16 uint16;
+
+ /// 32 bit unsigned integer type.
+ typedef detail::uint32 uint32;
+
+ /// 64 bit unsigned integer type.
+ typedef detail::uint64 uint64;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/scalar_ulp.hpp b/src/include/glm/ext/scalar_ulp.hpp
new file mode 100644
index 0000000..1650b83
--- /dev/null
+++ b/src/include/glm/ext/scalar_ulp.hpp
@@ -0,0 +1,74 @@
+/// @ref ext_scalar_ulp
+/// @file glm/ext/scalar_ulp.hpp
+///
+/// @defgroup ext_scalar_ulp GLM_EXT_scalar_ulp
+/// @ingroup ext
+///
+/// Allow the measurement of the accuracy of a function against a reference
+/// implementation. This extension works on floating-point data and provide results
+/// in ULP.
+///
+/// Include <glm/ext/scalar_ulp.hpp> to use the features of this extension.
+///
+/// @see ext_vector_ulp
+/// @see ext_scalar_relational
+
+#pragma once
+
+// Dependencies
+#include "../ext/scalar_int_sized.hpp"
+#include "../common.hpp"
+#include "../detail/qualifier.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_scalar_ulp extension included")
+#endif
+
+namespace glm
+{
+ /// Return the next ULP value(s) after the input value(s).
+ ///
+ /// @tparam genType A floating-point scalar type.
+ ///
+ /// @see ext_scalar_ulp
+ template<typename genType>
+ GLM_FUNC_DECL genType nextFloat(genType x);
+
+ /// Return the previous ULP value(s) before the input value(s).
+ ///
+ /// @tparam genType A floating-point scalar type.
+ ///
+ /// @see ext_scalar_ulp
+ template<typename genType>
+ GLM_FUNC_DECL genType prevFloat(genType x);
+
+ /// Return the value(s) ULP distance after the input value(s).
+ ///
+ /// @tparam genType A floating-point scalar type.
+ ///
+ /// @see ext_scalar_ulp
+ template<typename genType>
+ GLM_FUNC_DECL genType nextFloat(genType x, int ULPs);
+
+ /// Return the value(s) ULP distance before the input value(s).
+ ///
+ /// @tparam genType A floating-point scalar type.
+ ///
+ /// @see ext_scalar_ulp
+ template<typename genType>
+ GLM_FUNC_DECL genType prevFloat(genType x, int ULPs);
+
+ /// Return the distance in the number of ULP between 2 single-precision floating-point scalars.
+ ///
+ /// @see ext_scalar_ulp
+ GLM_FUNC_DECL int floatDistance(float x, float y);
+
+ /// Return the distance in the number of ULP between 2 double-precision floating-point scalars.
+ ///
+ /// @see ext_scalar_ulp
+ GLM_FUNC_DECL int64 floatDistance(double x, double y);
+
+ /// @}
+}//namespace glm
+
+#include "scalar_ulp.inl"
diff --git a/src/include/glm/ext/scalar_ulp.inl b/src/include/glm/ext/scalar_ulp.inl
new file mode 100644
index 0000000..53467ef
--- /dev/null
+++ b/src/include/glm/ext/scalar_ulp.inl
@@ -0,0 +1,284 @@
+/// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+///
+/// Developed at SunPro, a Sun Microsystems, Inc. business.
+/// Permission to use, copy, modify, and distribute this
+/// software is freely granted, provided that this notice
+/// is preserved.
+
+#include "../detail/type_float.hpp"
+#include "../ext/scalar_constants.hpp"
+#include <cmath>
+#include <cfloat>
+
+#if(GLM_COMPILER & GLM_COMPILER_VC)
+# pragma warning(push)
+# pragma warning(disable : 4127)
+#endif
+
+typedef union
+{
+ float value;
+ /* FIXME: Assumes 32 bit int. */
+ unsigned int word;
+} ieee_float_shape_type;
+
+typedef union
+{
+ double value;
+ struct
+ {
+ int lsw;
+ int msw;
+ } parts;
+} ieee_double_shape_type;
+
+#define GLM_EXTRACT_WORDS(ix0,ix1,d) \
+ do { \
+ ieee_double_shape_type ew_u; \
+ ew_u.value = (d); \
+ (ix0) = ew_u.parts.msw; \
+ (ix1) = ew_u.parts.lsw; \
+ } while (0)
+
+#define GLM_GET_FLOAT_WORD(i,d) \
+ do { \
+ ieee_float_shape_type gf_u; \
+ gf_u.value = (d); \
+ (i) = gf_u.word; \
+ } while (0)
+
+#define GLM_SET_FLOAT_WORD(d,i) \
+ do { \
+ ieee_float_shape_type sf_u; \
+ sf_u.word = (i); \
+ (d) = sf_u.value; \
+ } while (0)
+
+#define GLM_INSERT_WORDS(d,ix0,ix1) \
+ do { \
+ ieee_double_shape_type iw_u; \
+ iw_u.parts.msw = (ix0); \
+ iw_u.parts.lsw = (ix1); \
+ (d) = iw_u.value; \
+ } while (0)
+
+namespace glm{
+namespace detail
+{
+ GLM_FUNC_QUALIFIER float nextafterf(float x, float y)
+ {
+ volatile float t;
+ int hx, hy, ix, iy;
+
+ GLM_GET_FLOAT_WORD(hx, x);
+ GLM_GET_FLOAT_WORD(hy, y);
+ ix = hx & 0x7fffffff; // |x|
+ iy = hy & 0x7fffffff; // |y|
+
+ if((ix > 0x7f800000) || // x is nan
+ (iy > 0x7f800000)) // y is nan
+ return x + y;
+ if(abs(y - x) <= epsilon<float>())
+ return y; // x=y, return y
+ if(ix == 0)
+ { // x == 0
+ GLM_SET_FLOAT_WORD(x, (hy & 0x80000000) | 1);// return +-minsubnormal
+ t = x * x;
+ if(abs(t - x) <= epsilon<float>())
+ return t;
+ else
+ return x; // raise underflow flag
+ }
+ if(hx >= 0)
+ { // x > 0
+ if(hx > hy) // x > y, x -= ulp
+ hx -= 1;
+ else // x < y, x += ulp
+ hx += 1;
+ }
+ else
+ { // x < 0
+ if(hy >= 0 || hx > hy) // x < y, x -= ulp
+ hx -= 1;
+ else // x > y, x += ulp
+ hx += 1;
+ }
+ hy = hx & 0x7f800000;
+ if(hy >= 0x7f800000)
+ return x + x; // overflow
+ if(hy < 0x00800000) // underflow
+ {
+ t = x * x;
+ if(abs(t - x) > epsilon<float>())
+ { // raise underflow flag
+ GLM_SET_FLOAT_WORD(y, hx);
+ return y;
+ }
+ }
+ GLM_SET_FLOAT_WORD(x, hx);
+ return x;
+ }
+
+ GLM_FUNC_QUALIFIER double nextafter(double x, double y)
+ {
+ volatile double t;
+ int hx, hy, ix, iy;
+ unsigned int lx, ly;
+
+ GLM_EXTRACT_WORDS(hx, lx, x);
+ GLM_EXTRACT_WORDS(hy, ly, y);
+ ix = hx & 0x7fffffff; // |x|
+ iy = hy & 0x7fffffff; // |y|
+
+ if(((ix >= 0x7ff00000) && ((ix - 0x7ff00000) | lx) != 0) || // x is nan
+ ((iy >= 0x7ff00000) && ((iy - 0x7ff00000) | ly) != 0)) // y is nan
+ return x + y;
+ if(abs(y - x) <= epsilon<double>())
+ return y; // x=y, return y
+ if((ix | lx) == 0)
+ { // x == 0
+ GLM_INSERT_WORDS(x, hy & 0x80000000, 1); // return +-minsubnormal
+ t = x * x;
+ if(abs(t - x) <= epsilon<double>())
+ return t;
+ else
+ return x; // raise underflow flag
+ }
+ if(hx >= 0) { // x > 0
+ if(hx > hy || ((hx == hy) && (lx > ly))) { // x > y, x -= ulp
+ if(lx == 0) hx -= 1;
+ lx -= 1;
+ }
+ else { // x < y, x += ulp
+ lx += 1;
+ if(lx == 0) hx += 1;
+ }
+ }
+ else { // x < 0
+ if(hy >= 0 || hx > hy || ((hx == hy) && (lx > ly))){// x < y, x -= ulp
+ if(lx == 0) hx -= 1;
+ lx -= 1;
+ }
+ else { // x > y, x += ulp
+ lx += 1;
+ if(lx == 0) hx += 1;
+ }
+ }
+ hy = hx & 0x7ff00000;
+ if(hy >= 0x7ff00000)
+ return x + x; // overflow
+ if(hy < 0x00100000)
+ { // underflow
+ t = x * x;
+ if(abs(t - x) > epsilon<double>())
+ { // raise underflow flag
+ GLM_INSERT_WORDS(y, hx, lx);
+ return y;
+ }
+ }
+ GLM_INSERT_WORDS(x, hx, lx);
+ return x;
+ }
+}//namespace detail
+}//namespace glm
+
+#if(GLM_COMPILER & GLM_COMPILER_VC)
+# pragma warning(pop)
+#endif
+
+namespace glm
+{
+ template<>
+ GLM_FUNC_QUALIFIER float nextFloat(float x)
+ {
+# if GLM_HAS_CXX11_STL
+ return std::nextafter(x, std::numeric_limits<float>::max());
+# elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
+ return detail::nextafterf(x, FLT_MAX);
+# elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+ return __builtin_nextafterf(x, FLT_MAX);
+# else
+ return nextafterf(x, FLT_MAX);
+# endif
+ }
+
+ template<>
+ GLM_FUNC_QUALIFIER double nextFloat(double x)
+ {
+# if GLM_HAS_CXX11_STL
+ return std::nextafter(x, std::numeric_limits<double>::max());
+# elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
+ return detail::nextafter(x, std::numeric_limits<double>::max());
+# elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+ return __builtin_nextafter(x, DBL_MAX);
+# else
+ return nextafter(x, DBL_MAX);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T nextFloat(T x, int ULPs)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'next_float' only accept floating-point input");
+ assert(ULPs >= 0);
+
+ T temp = x;
+ for(int i = 0; i < ULPs; ++i)
+ temp = nextFloat(temp);
+ return temp;
+ }
+
+ GLM_FUNC_QUALIFIER float prevFloat(float x)
+ {
+# if GLM_HAS_CXX11_STL
+ return std::nextafter(x, std::numeric_limits<float>::min());
+# elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
+ return detail::nextafterf(x, FLT_MIN);
+# elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+ return __builtin_nextafterf(x, FLT_MIN);
+# else
+ return nextafterf(x, FLT_MIN);
+# endif
+ }
+
+ GLM_FUNC_QUALIFIER double prevFloat(double x)
+ {
+# if GLM_HAS_CXX11_STL
+ return std::nextafter(x, std::numeric_limits<double>::min());
+# elif((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))
+ return _nextafter(x, DBL_MIN);
+# elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
+ return __builtin_nextafter(x, DBL_MIN);
+# else
+ return nextafter(x, DBL_MIN);
+# endif
+ }
+
+ template<typename T>
+ GLM_FUNC_QUALIFIER T prevFloat(T x, int ULPs)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'prev_float' only accept floating-point input");
+ assert(ULPs >= 0);
+
+ T temp = x;
+ for(int i = 0; i < ULPs; ++i)
+ temp = prevFloat(temp);
+ return temp;
+ }
+
+ GLM_FUNC_QUALIFIER int floatDistance(float x, float y)
+ {
+ detail::float_t<float> const a(x);
+ detail::float_t<float> const b(y);
+
+ return abs(a.i - b.i);
+ }
+
+ GLM_FUNC_QUALIFIER int64 floatDistance(double x, double y)
+ {
+ detail::float_t<double> const a(x);
+ detail::float_t<double> const b(y);
+
+ return abs(a.i - b.i);
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/vector_bool1.hpp b/src/include/glm/ext/vector_bool1.hpp
new file mode 100644
index 0000000..33b9849
--- /dev/null
+++ b/src/include/glm/ext/vector_bool1.hpp
@@ -0,0 +1,30 @@
+/// @ref ext_vector_bool1
+/// @file glm/ext/vector_bool1.hpp
+///
+/// @defgroup ext_vector_bool1 GLM_EXT_vector_bool1
+/// @ingroup ext
+///
+/// Exposes bvec1 vector type.
+///
+/// Include <glm/ext/vector_bool1.hpp> to use the features of this extension.
+///
+/// @see ext_vector_bool1_precision extension.
+
+#pragma once
+
+#include "../detail/type_vec1.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_bool1 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_bool1
+ /// @{
+
+ /// 1 components vector of boolean.
+ typedef vec<1, bool, defaultp> bvec1;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_bool1_precision.hpp b/src/include/glm/ext/vector_bool1_precision.hpp
new file mode 100644
index 0000000..f97f168
--- /dev/null
+++ b/src/include/glm/ext/vector_bool1_precision.hpp
@@ -0,0 +1,34 @@
+/// @ref ext_vector_bool1_precision
+/// @file glm/ext/vector_bool1_precision.hpp
+///
+/// @defgroup ext_vector_bool1_precision GLM_EXT_vector_bool1_precision
+/// @ingroup ext
+///
+/// Exposes highp_bvec1, mediump_bvec1 and lowp_bvec1 types.
+///
+/// Include <glm/ext/vector_bool1_precision.hpp> to use the features of this extension.
+
+#pragma once
+
+#include "../detail/type_vec1.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_bool1_precision extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_bool1_precision
+ /// @{
+
+ /// 1 component vector of bool values.
+ typedef vec<1, bool, highp> highp_bvec1;
+
+ /// 1 component vector of bool values.
+ typedef vec<1, bool, mediump> mediump_bvec1;
+
+ /// 1 component vector of bool values.
+ typedef vec<1, bool, lowp> lowp_bvec1;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_bool2.hpp b/src/include/glm/ext/vector_bool2.hpp
new file mode 100644
index 0000000..5e17539
--- /dev/null
+++ b/src/include/glm/ext/vector_bool2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_bool2.hpp
+
+#pragma once
+#include "../detail/type_vec2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 2 components vector of boolean.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<2, bool, defaultp> bvec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_bool2_precision.hpp b/src/include/glm/ext/vector_bool2_precision.hpp
new file mode 100644
index 0000000..2e4ae80
--- /dev/null
+++ b/src/include/glm/ext/vector_bool2_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/vector_bool2_precision.hpp
+
+#pragma once
+#include "../detail/type_vec2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 2 components vector of high qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, bool, highp> highp_bvec2;
+
+ /// 2 components vector of medium qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, bool, mediump> mediump_bvec2;
+
+ /// 2 components vector of low qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, bool, lowp> lowp_bvec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_bool3.hpp b/src/include/glm/ext/vector_bool3.hpp
new file mode 100644
index 0000000..4547898
--- /dev/null
+++ b/src/include/glm/ext/vector_bool3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_bool3.hpp
+
+#pragma once
+#include "../detail/type_vec3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 3 components vector of boolean.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<3, bool, defaultp> bvec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_bool3_precision.hpp b/src/include/glm/ext/vector_bool3_precision.hpp
new file mode 100644
index 0000000..6af2bc9
--- /dev/null
+++ b/src/include/glm/ext/vector_bool3_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/vector_bool3_precision.hpp
+
+#pragma once
+#include "../detail/type_vec3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 3 components vector of high qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, bool, highp> highp_bvec3;
+
+ /// 3 components vector of medium qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, bool, mediump> mediump_bvec3;
+
+ /// 3 components vector of low qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, bool, lowp> lowp_bvec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_bool4.hpp b/src/include/glm/ext/vector_bool4.hpp
new file mode 100644
index 0000000..93464d7
--- /dev/null
+++ b/src/include/glm/ext/vector_bool4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_bool4.hpp
+
+#pragma once
+#include "../detail/type_vec4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 4 components vector of boolean.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<4, bool, defaultp> bvec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_bool4_precision.hpp b/src/include/glm/ext/vector_bool4_precision.hpp
new file mode 100644
index 0000000..968b494
--- /dev/null
+++ b/src/include/glm/ext/vector_bool4_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/vector_bool4_precision.hpp
+
+#pragma once
+#include "../detail/type_vec4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 4 components vector of high qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, bool, highp> highp_bvec4;
+
+ /// 4 components vector of medium qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, bool, mediump> mediump_bvec4;
+
+ /// 4 components vector of low qualifier bool numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, bool, lowp> lowp_bvec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_common.hpp b/src/include/glm/ext/vector_common.hpp
new file mode 100644
index 0000000..a4b57a0
--- /dev/null
+++ b/src/include/glm/ext/vector_common.hpp
@@ -0,0 +1,204 @@
+/// @ref ext_vector_common
+/// @file glm/ext/vector_common.hpp
+///
+/// @defgroup ext_vector_common GLM_EXT_vector_common
+/// @ingroup ext
+///
+/// Exposes min and max functions for 3 to 4 vector parameters.
+///
+/// Include <glm/ext/vector_common.hpp> to use the features of this extension.
+///
+/// @see core_common
+/// @see ext_scalar_common
+
+#pragma once
+
+// Dependency:
+#include "../ext/scalar_common.hpp"
+#include "../common.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_common extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_common
+ /// @{
+
+ /// Return the minimum component-wise values of 3 inputs
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c);
+
+ /// Return the minimum component-wise values of 4 inputs
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d);
+
+ /// Return the maximum component-wise values of 3 inputs
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z);
+
+ /// Return the maximum component-wise values of 4 inputs
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, T, Q> max( vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z, vec<L, T, Q> const& w);
+
+ /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a>
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& x, T y);
+
+ /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a>
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& x, vec<L, T, Q> const& y);
+
+ /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a>
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c);
+
+ /// Returns y if y < x; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmin">std::fmin documentation</a>
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d);
+
+ /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, T b);
+
+ /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b);
+
+ /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c);
+
+ /// Returns y if x < y; otherwise, it returns x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see <a href="http://en.cppreference.com/w/cpp/numeric/math/fmax">std::fmax documentation</a>
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d);
+
+ /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_common
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal);
+
+ /// Returns min(max(x, minVal), maxVal) for each component in x. If one of the two arguments is NaN, the value of the other argument is returned.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_common
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal);
+
+ /// Simulate GL_CLAMP OpenGL wrap mode
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_common extension.
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> clamp(vec<L, T, Q> const& Texcoord);
+
+ /// Simulate GL_REPEAT OpenGL wrap mode
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_common extension.
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> repeat(vec<L, T, Q> const& Texcoord);
+
+ /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_common extension.
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> mirrorClamp(vec<L, T, Q> const& Texcoord);
+
+ /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point scalar types
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_common extension.
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> mirrorRepeat(vec<L, T, Q> const& Texcoord);
+
+ /// @}
+}//namespace glm
+
+#include "vector_common.inl"
diff --git a/src/include/glm/ext/vector_common.inl b/src/include/glm/ext/vector_common.inl
new file mode 100644
index 0000000..f893d6e
--- /dev/null
+++ b/src/include/glm/ext/vector_common.inl
@@ -0,0 +1,129 @@
+#include "../detail/_vectorize.hpp"
+
+namespace glm
+{
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'min' only accept floating-point or integer inputs");
+ return glm::min(glm::min(x, y), z);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> min(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z, vec<L, T, Q> const& w)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'min' only accept floating-point or integer inputs");
+ return glm::min(glm::min(x, y), glm::min(z, w));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'max' only accept floating-point or integer inputs");
+ return glm::max(glm::max(x, y), z);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, T, Q> max(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& z, vec<L, T, Q> const& w)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'max' only accept floating-point or integer inputs");
+ return glm::max(glm::max(x, y), glm::max(z, w));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fmin(vec<L, T, Q> const& a, T b)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmin' only accept floating-point inputs");
+ return detail::functor2<vec, L, T, Q>::call(fmin, a, vec<L, T, Q>(b));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmin' only accept floating-point inputs");
+ return detail::functor2<vec, L, T, Q>::call(fmin, a, b);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmin' only accept floating-point inputs");
+ return fmin(fmin(a, b), c);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fmin(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmin' only accept floating-point inputs");
+ return fmin(fmin(a, b), fmin(c, d));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fmax(vec<L, T, Q> const& a, T b)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmax' only accept floating-point inputs");
+ return detail::functor2<vec, L, T, Q>::call(fmax, a, vec<L, T, Q>(b));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmax' only accept floating-point inputs");
+ return detail::functor2<vec, L, T, Q>::call(fmax, a, b);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmax' only accept floating-point inputs");
+ return fmax(fmax(a, b), c);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fmax(vec<L, T, Q> const& a, vec<L, T, Q> const& b, vec<L, T, Q> const& c, vec<L, T, Q> const& d)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fmax' only accept floating-point inputs");
+ return fmax(fmax(a, b), fmax(c, d));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal)
+ {
+ return fmin(fmax(x, vec<L, T, Q>(minVal)), vec<L, T, Q>(maxVal));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal)
+ {
+ return fmin(fmax(x, minVal), maxVal);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> clamp(vec<L, T, Q> const& Texcoord)
+ {
+ return glm::clamp(Texcoord, vec<L, T, Q>(0), vec<L, T, Q>(1));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> repeat(vec<L, T, Q> const& Texcoord)
+ {
+ return glm::fract(Texcoord);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> mirrorClamp(vec<L, T, Q> const& Texcoord)
+ {
+ return glm::fract(glm::abs(Texcoord));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> mirrorRepeat(vec<L, T, Q> const& Texcoord)
+ {
+ vec<L, T, Q> const Abs = glm::abs(Texcoord);
+ vec<L, T, Q> const Clamp = glm::mod(glm::floor(Abs), vec<L, T, Q>(2));
+ vec<L, T, Q> const Floor = glm::floor(Abs);
+ vec<L, T, Q> const Rest = Abs - Floor;
+ vec<L, T, Q> const Mirror = Clamp + Rest;
+ return mix(Rest, vec<L, T, Q>(1) - Rest, glm::greaterThanEqual(Mirror, vec<L, T, Q>(1)));
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/vector_double1.hpp b/src/include/glm/ext/vector_double1.hpp
new file mode 100644
index 0000000..98fc569
--- /dev/null
+++ b/src/include/glm/ext/vector_double1.hpp
@@ -0,0 +1,31 @@
+/// @ref ext_vector_double1
+/// @file glm/ext/vector_double1.hpp
+///
+/// @defgroup ext_vector_double1 GLM_EXT_vector_double1
+/// @ingroup ext
+///
+/// Exposes double-precision floating point vector type with one component.
+///
+/// Include <glm/ext/vector_double1.hpp> to use the features of this extension.
+///
+/// @see ext_vector_double1_precision extension.
+/// @see ext_vector_float1 extension.
+
+#pragma once
+
+#include "../detail/type_vec1.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_double1 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_double1
+ /// @{
+
+ /// 1 components vector of double-precision floating-point numbers.
+ typedef vec<1, double, defaultp> dvec1;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_double1_precision.hpp b/src/include/glm/ext/vector_double1_precision.hpp
new file mode 100644
index 0000000..9c3d8fd
--- /dev/null
+++ b/src/include/glm/ext/vector_double1_precision.hpp
@@ -0,0 +1,36 @@
+/// @ref ext_vector_double1_precision
+/// @file glm/ext/vector_double1_precision.hpp
+///
+/// @defgroup ext_vector_double1_precision GLM_EXT_vector_double1_precision
+/// @ingroup ext
+///
+/// Exposes highp_dvec1, mediump_dvec1 and lowp_dvec1 types.
+///
+/// Include <glm/ext/vector_double1_precision.hpp> to use the features of this extension.
+///
+/// @see ext_vector_double1
+
+#pragma once
+
+#include "../detail/type_vec1.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_double1_precision extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_double1_precision
+ /// @{
+
+ /// 1 component vector of double-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ typedef vec<1, double, highp> highp_dvec1;
+
+ /// 1 component vector of double-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ typedef vec<1, double, mediump> mediump_dvec1;
+
+ /// 1 component vector of double-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ typedef vec<1, double, lowp> lowp_dvec1;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_double2.hpp b/src/include/glm/ext/vector_double2.hpp
new file mode 100644
index 0000000..63be40e
--- /dev/null
+++ b/src/include/glm/ext/vector_double2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_double2.hpp
+
+#pragma once
+#include "../detail/type_vec2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 2 components vector of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<2, double, defaultp> dvec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_double2_precision.hpp b/src/include/glm/ext/vector_double2_precision.hpp
new file mode 100644
index 0000000..f34e5eb
--- /dev/null
+++ b/src/include/glm/ext/vector_double2_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/vector_double2_precision.hpp
+
+#pragma once
+#include "../detail/type_vec2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 2 components vector of high double-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, double, highp> highp_dvec2;
+
+ /// 2 components vector of medium double-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, double, mediump> mediump_dvec2;
+
+ /// 2 components vector of low double-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, double, lowp> lowp_dvec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_double3.hpp b/src/include/glm/ext/vector_double3.hpp
new file mode 100644
index 0000000..d412e35
--- /dev/null
+++ b/src/include/glm/ext/vector_double3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_double3.hpp
+
+#pragma once
+#include "../detail/type_vec3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 3 components vector of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<3, double, defaultp> dvec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_double3_precision.hpp b/src/include/glm/ext/vector_double3_precision.hpp
new file mode 100644
index 0000000..2bc81c3
--- /dev/null
+++ b/src/include/glm/ext/vector_double3_precision.hpp
@@ -0,0 +1,34 @@
+/// @ref core
+/// @file glm/ext/vector_double3_precision.hpp
+
+#pragma once
+#include "../detail/type_vec3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 3 components vector of high double-qualifier floating-point numbers.
+ /// There is no guarantee on the actual qualifier.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, double, highp> highp_dvec3;
+
+ /// 3 components vector of medium double-qualifier floating-point numbers.
+ /// There is no guarantee on the actual qualifier.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, double, mediump> mediump_dvec3;
+
+ /// 3 components vector of low double-qualifier floating-point numbers.
+ /// There is no guarantee on the actual qualifier.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, double, lowp> lowp_dvec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_double4.hpp b/src/include/glm/ext/vector_double4.hpp
new file mode 100644
index 0000000..39066c8
--- /dev/null
+++ b/src/include/glm/ext/vector_double4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_double4.hpp
+
+#pragma once
+#include "../detail/type_vec4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 4 components vector of double-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<4, double, defaultp> dvec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_double4_precision.hpp b/src/include/glm/ext/vector_double4_precision.hpp
new file mode 100644
index 0000000..88b76c9
--- /dev/null
+++ b/src/include/glm/ext/vector_double4_precision.hpp
@@ -0,0 +1,35 @@
+/// @ref core
+/// @file glm/ext/vector_double4_precision.hpp
+
+#pragma once
+#include "../detail/setup.hpp"
+#include "../detail/type_vec4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 4 components vector of high double-qualifier floating-point numbers.
+ /// There is no guarantee on the actual qualifier.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, double, highp> highp_dvec4;
+
+ /// 4 components vector of medium double-qualifier floating-point numbers.
+ /// There is no guarantee on the actual qualifier.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, double, mediump> mediump_dvec4;
+
+ /// 4 components vector of low double-qualifier floating-point numbers.
+ /// There is no guarantee on the actual qualifier.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, double, lowp> lowp_dvec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_float1.hpp b/src/include/glm/ext/vector_float1.hpp
new file mode 100644
index 0000000..fc94e29
--- /dev/null
+++ b/src/include/glm/ext/vector_float1.hpp
@@ -0,0 +1,31 @@
+/// @ref ext_vector_float1
+/// @file glm/ext/vector_float1.hpp
+///
+/// @defgroup ext_vector_float1 GLM_EXT_vector_float1
+/// @ingroup ext
+///
+/// Exposes single-precision floating point vector type with one component.
+///
+/// Include <glm/ext/vector_float1.hpp> to use the features of this extension.
+///
+/// @see ext_vector_float1_precision extension.
+/// @see ext_vector_double1 extension.
+
+#pragma once
+
+#include "../detail/type_vec1.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_float1 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_float1
+ /// @{
+
+ /// 1 components vector of single-precision floating-point numbers.
+ typedef vec<1, float, defaultp> vec1;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_float1_precision.hpp b/src/include/glm/ext/vector_float1_precision.hpp
new file mode 100644
index 0000000..4a633f5
--- /dev/null
+++ b/src/include/glm/ext/vector_float1_precision.hpp
@@ -0,0 +1,36 @@
+/// @ref ext_vector_float1_precision
+/// @file glm/ext/vector_float1_precision.hpp
+///
+/// @defgroup ext_vector_float1_precision GLM_EXT_vector_float1_precision
+/// @ingroup ext
+///
+/// Exposes highp_vec1, mediump_vec1 and lowp_vec1 types.
+///
+/// Include <glm/ext/vector_float1_precision.hpp> to use the features of this extension.
+///
+/// @see ext_vector_float1 extension.
+
+#pragma once
+
+#include "../detail/type_vec1.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_float1_precision extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_float1_precision
+ /// @{
+
+ /// 1 component vector of single-precision floating-point numbers using high precision arithmetic in term of ULPs.
+ typedef vec<1, float, highp> highp_vec1;
+
+ /// 1 component vector of single-precision floating-point numbers using medium precision arithmetic in term of ULPs.
+ typedef vec<1, float, mediump> mediump_vec1;
+
+ /// 1 component vector of single-precision floating-point numbers using low precision arithmetic in term of ULPs.
+ typedef vec<1, float, lowp> lowp_vec1;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_float2.hpp b/src/include/glm/ext/vector_float2.hpp
new file mode 100644
index 0000000..e366549
--- /dev/null
+++ b/src/include/glm/ext/vector_float2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_float2.hpp
+
+#pragma once
+#include "../detail/type_vec2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 2 components vector of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<2, float, defaultp> vec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_float2_precision.hpp b/src/include/glm/ext/vector_float2_precision.hpp
new file mode 100644
index 0000000..b88e95a
--- /dev/null
+++ b/src/include/glm/ext/vector_float2_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/vector_float2_precision.hpp
+
+#pragma once
+#include "../detail/type_vec2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 2 components vector of high single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, float, highp> highp_vec2;
+
+ /// 2 components vector of medium single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, float, mediump> mediump_vec2;
+
+ /// 2 components vector of low single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<2, float, lowp> lowp_vec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_float3.hpp b/src/include/glm/ext/vector_float3.hpp
new file mode 100644
index 0000000..64bec8b
--- /dev/null
+++ b/src/include/glm/ext/vector_float3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_float3.hpp
+
+#pragma once
+#include "../detail/type_vec3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 3 components vector of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<3, float, defaultp> vec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_float3_precision.hpp b/src/include/glm/ext/vector_float3_precision.hpp
new file mode 100644
index 0000000..abe7c4a
--- /dev/null
+++ b/src/include/glm/ext/vector_float3_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/vector_float3_precision.hpp
+
+#pragma once
+#include "../detail/type_vec3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 3 components vector of high single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, float, highp> highp_vec3;
+
+ /// 3 components vector of medium single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, float, mediump> mediump_vec3;
+
+ /// 3 components vector of low single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<3, float, lowp> lowp_vec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_float4.hpp b/src/include/glm/ext/vector_float4.hpp
new file mode 100644
index 0000000..ba10e23
--- /dev/null
+++ b/src/include/glm/ext/vector_float4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_float4.hpp
+
+#pragma once
+#include "../detail/type_vec4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 4 components vector of single-precision floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<4, float, defaultp> vec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_float4_precision.hpp b/src/include/glm/ext/vector_float4_precision.hpp
new file mode 100644
index 0000000..ea7b5ba
--- /dev/null
+++ b/src/include/glm/ext/vector_float4_precision.hpp
@@ -0,0 +1,31 @@
+/// @ref core
+/// @file glm/ext/vector_float4_precision.hpp
+
+#pragma once
+#include "../detail/type_vec4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector_precision
+ /// @{
+
+ /// 4 components vector of high single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, float, highp> highp_vec4;
+
+ /// 4 components vector of medium single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, float, mediump> mediump_vec4;
+
+ /// 4 components vector of low single-qualifier floating-point numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>
+ typedef vec<4, float, lowp> lowp_vec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_int1.hpp b/src/include/glm/ext/vector_int1.hpp
new file mode 100644
index 0000000..178be7b
--- /dev/null
+++ b/src/include/glm/ext/vector_int1.hpp
@@ -0,0 +1,32 @@
+/// @ref ext_vector_int1
+/// @file glm/ext/vector_int1.hpp
+///
+/// @defgroup ext_vector_int1 GLM_EXT_vector_int1
+/// @ingroup ext
+///
+/// Exposes ivec1 vector type.
+///
+/// Include <glm/ext/vector_int1.hpp> to use the features of this extension.
+///
+/// @see ext_vector_uint1 extension.
+/// @see ext_vector_int1_precision extension.
+
+#pragma once
+
+#include "../detail/type_vec1.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_int1 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_int1
+ /// @{
+
+ /// 1 component vector of signed integer numbers.
+ typedef vec<1, int, defaultp> ivec1;
+
+ /// @}
+}//namespace glm
+
diff --git a/src/include/glm/ext/vector_int1_sized.hpp b/src/include/glm/ext/vector_int1_sized.hpp
new file mode 100644
index 0000000..95a08e6
--- /dev/null
+++ b/src/include/glm/ext/vector_int1_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_vector_int1_sized
+/// @file glm/ext/vector_int1_sized.hpp
+///
+/// @defgroup ext_vector_int1_sized GLM_EXT_vector_int1_sized
+/// @ingroup ext
+///
+/// Exposes sized signed integer vector types.
+///
+/// Include <glm/ext/vector_int1_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_int_sized
+/// @see ext_vector_uint1_sized
+
+#pragma once
+
+#include "../ext/vector_int1.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_int1_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_int1_sized
+ /// @{
+
+ /// 8 bit signed integer vector of 1 component type.
+ ///
+ /// @see ext_vector_int1_sized
+ typedef vec<1, int8, defaultp> i8vec1;
+
+ /// 16 bit signed integer vector of 1 component type.
+ ///
+ /// @see ext_vector_int1_sized
+ typedef vec<1, int16, defaultp> i16vec1;
+
+ /// 32 bit signed integer vector of 1 component type.
+ ///
+ /// @see ext_vector_int1_sized
+ typedef vec<1, int32, defaultp> i32vec1;
+
+ /// 64 bit signed integer vector of 1 component type.
+ ///
+ /// @see ext_vector_int1_sized
+ typedef vec<1, int64, defaultp> i64vec1;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_int2.hpp b/src/include/glm/ext/vector_int2.hpp
new file mode 100644
index 0000000..76a5e16
--- /dev/null
+++ b/src/include/glm/ext/vector_int2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_int2.hpp
+
+#pragma once
+#include "../detail/type_vec2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 2 components vector of signed integer numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<2, int, defaultp> ivec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_int2_sized.hpp b/src/include/glm/ext/vector_int2_sized.hpp
new file mode 100644
index 0000000..610ca44
--- /dev/null
+++ b/src/include/glm/ext/vector_int2_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_vector_int2_sized
+/// @file glm/ext/vector_int2_sized.hpp
+///
+/// @defgroup ext_vector_int2_sized GLM_EXT_vector_int2_sized
+/// @ingroup ext
+///
+/// Exposes sized signed integer vector of 2 components type.
+///
+/// Include <glm/ext/vector_int2_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_int_sized
+/// @see ext_vector_uint2_sized
+
+#pragma once
+
+#include "../ext/vector_int2.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_int2_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_int2_sized
+ /// @{
+
+ /// 8 bit signed integer vector of 2 components type.
+ ///
+ /// @see ext_vector_int2_sized
+ typedef vec<2, int8, defaultp> i8vec2;
+
+ /// 16 bit signed integer vector of 2 components type.
+ ///
+ /// @see ext_vector_int2_sized
+ typedef vec<2, int16, defaultp> i16vec2;
+
+ /// 32 bit signed integer vector of 2 components type.
+ ///
+ /// @see ext_vector_int2_sized
+ typedef vec<2, int32, defaultp> i32vec2;
+
+ /// 64 bit signed integer vector of 2 components type.
+ ///
+ /// @see ext_vector_int2_sized
+ typedef vec<2, int64, defaultp> i64vec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_int3.hpp b/src/include/glm/ext/vector_int3.hpp
new file mode 100644
index 0000000..ee21b5e
--- /dev/null
+++ b/src/include/glm/ext/vector_int3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_int3.hpp
+
+#pragma once
+#include "../detail/type_vec3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 3 components vector of signed integer numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<3, int, defaultp> ivec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_int3_sized.hpp b/src/include/glm/ext/vector_int3_sized.hpp
new file mode 100644
index 0000000..8d2d8b4
--- /dev/null
+++ b/src/include/glm/ext/vector_int3_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_vector_int3_sized
+/// @file glm/ext/vector_int3_sized.hpp
+///
+/// @defgroup ext_vector_int3_sized GLM_EXT_vector_int3_sized
+/// @ingroup ext
+///
+/// Exposes sized signed integer vector of 3 components type.
+///
+/// Include <glm/ext/vector_int3_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_int_sized
+/// @see ext_vector_uint3_sized
+
+#pragma once
+
+#include "../ext/vector_int3.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_int3_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_int3_sized
+ /// @{
+
+ /// 8 bit signed integer vector of 3 components type.
+ ///
+ /// @see ext_vector_int3_sized
+ typedef vec<3, int8, defaultp> i8vec3;
+
+ /// 16 bit signed integer vector of 3 components type.
+ ///
+ /// @see ext_vector_int3_sized
+ typedef vec<3, int16, defaultp> i16vec3;
+
+ /// 32 bit signed integer vector of 3 components type.
+ ///
+ /// @see ext_vector_int3_sized
+ typedef vec<3, int32, defaultp> i32vec3;
+
+ /// 64 bit signed integer vector of 3 components type.
+ ///
+ /// @see ext_vector_int3_sized
+ typedef vec<3, int64, defaultp> i64vec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_int4.hpp b/src/include/glm/ext/vector_int4.hpp
new file mode 100644
index 0000000..e29cdc7
--- /dev/null
+++ b/src/include/glm/ext/vector_int4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_int4.hpp
+
+#pragma once
+#include "../detail/type_vec4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 4 components vector of signed integer numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<4, int, defaultp> ivec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_int4_sized.hpp b/src/include/glm/ext/vector_int4_sized.hpp
new file mode 100644
index 0000000..34b678f
--- /dev/null
+++ b/src/include/glm/ext/vector_int4_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_vector_int4_sized
+/// @file glm/ext/vector_int4_sized.hpp
+///
+/// @defgroup ext_vector_int4_sized GLM_EXT_vector_int4_sized
+/// @ingroup ext
+///
+/// Exposes sized signed integer vector of 4 components type.
+///
+/// Include <glm/ext/vector_int4_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_int_sized
+/// @see ext_vector_uint4_sized
+
+#pragma once
+
+#include "../ext/vector_int4.hpp"
+#include "../ext/scalar_int_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_int4_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_int4_sized
+ /// @{
+
+ /// 8 bit signed integer vector of 4 components type.
+ ///
+ /// @see ext_vector_int4_sized
+ typedef vec<4, int8, defaultp> i8vec4;
+
+ /// 16 bit signed integer vector of 4 components type.
+ ///
+ /// @see ext_vector_int4_sized
+ typedef vec<4, int16, defaultp> i16vec4;
+
+ /// 32 bit signed integer vector of 4 components type.
+ ///
+ /// @see ext_vector_int4_sized
+ typedef vec<4, int32, defaultp> i32vec4;
+
+ /// 64 bit signed integer vector of 4 components type.
+ ///
+ /// @see ext_vector_int4_sized
+ typedef vec<4, int64, defaultp> i64vec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_integer.hpp b/src/include/glm/ext/vector_integer.hpp
new file mode 100644
index 0000000..ef66f6c
--- /dev/null
+++ b/src/include/glm/ext/vector_integer.hpp
@@ -0,0 +1,149 @@
+/// @ref ext_vector_integer
+/// @file glm/ext/vector_integer.hpp
+///
+/// @see core (dependence)
+/// @see ext_vector_integer (dependence)
+///
+/// @defgroup ext_vector_integer GLM_EXT_vector_integer
+/// @ingroup ext
+///
+/// Include <glm/ext/vector_integer.hpp> to use the features of this extension.
+
+#pragma once
+
+// Dependencies
+#include "../detail/setup.hpp"
+#include "../detail/qualifier.hpp"
+#include "../detail/_vectorize.hpp"
+#include "../vector_relational.hpp"
+#include "../common.hpp"
+#include <limits>
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_integer extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_integer
+ /// @{
+
+ /// Return true if the value is a power of two number.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, bool, Q> isPowerOfTwo(vec<L, T, Q> const& v);
+
+ /// Return the power of two number which value is just higher the input value,
+ /// round up to a power of two.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> nextPowerOfTwo(vec<L, T, Q> const& v);
+
+ /// Return the power of two number which value is just lower the input value,
+ /// round down to a power of two.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> prevPowerOfTwo(vec<L, T, Q> const& v);
+
+ /// Return true if the 'Value' is a multiple of 'Multiple'.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, T Multiple);
+
+ /// Return true if the 'Value' is a multiple of 'Multiple'.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
+
+ /// Higher multiple number of Source.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @param v Source values to which is applied the function
+ /// @param Multiple Must be a null or positive value
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> nextMultiple(vec<L, T, Q> const& v, T Multiple);
+
+ /// Higher multiple number of Source.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @param v Source values to which is applied the function
+ /// @param Multiple Must be a null or positive value
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> nextMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
+
+ /// Lower multiple number of Source.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @param v Source values to which is applied the function
+ /// @param Multiple Must be a null or positive value
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> prevMultiple(vec<L, T, Q> const& v, T Multiple);
+
+ /// Lower multiple number of Source.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Signed or unsigned integer scalar types.
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @param v Source values to which is applied the function
+ /// @param Multiple Must be a null or positive value
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> prevMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
+
+ /// Returns the bit number of the Nth significant bit set to
+ /// 1 in the binary representation of value.
+ /// If value bitcount is less than the Nth significant bit, -1 will be returned.
+ ///
+ /// @tparam L An integer between 1 and 4 included that qualify the dimension of the vector.
+ /// @tparam T Signed or unsigned integer scalar types.
+ ///
+ /// @see ext_vector_integer
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, int, Q> findNSB(vec<L, T, Q> const& Source, vec<L, int, Q> SignificantBitCount);
+
+ /// @}
+} //namespace glm
+
+#include "vector_integer.inl"
diff --git a/src/include/glm/ext/vector_integer.inl b/src/include/glm/ext/vector_integer.inl
new file mode 100644
index 0000000..d4de2a4
--- /dev/null
+++ b/src/include/glm/ext/vector_integer.inl
@@ -0,0 +1,85 @@
+#include "scalar_integer.hpp"
+
+namespace glm
+{
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, bool, Q> isPowerOfTwo(vec<L, T, Q> const& Value)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'isPowerOfTwo' only accept integer inputs");
+
+ vec<L, T, Q> const Result(abs(Value));
+ return equal(Result & (Result - vec<L, T, Q>(1)), vec<L, T, Q>(0));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> nextPowerOfTwo(vec<L, T, Q> const& v)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'nextPowerOfTwo' only accept integer inputs");
+
+ return detail::compute_ceilPowerOfTwo<L, T, Q, std::numeric_limits<T>::is_signed>::call(v);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> prevPowerOfTwo(vec<L, T, Q> const& v)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'prevPowerOfTwo' only accept integer inputs");
+
+ return detail::functor1<vec, L, T, T, Q>::call(prevPowerOfTwo, v);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, bool, Q> isMultiple(vec<L, T, Q> const& Value, T Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'isMultiple' only accept integer inputs");
+
+ return (Value % Multiple) == vec<L, T, Q>(0);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, bool, Q> isMultiple(vec<L, T, Q> const& Value, vec<L, T, Q> const& Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'isMultiple' only accept integer inputs");
+
+ return (Value % Multiple) == vec<L, T, Q>(0);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> nextMultiple(vec<L, T, Q> const& Source, T Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'nextMultiple' only accept integer inputs");
+
+ return detail::functor2<vec, L, T, Q>::call(nextMultiple, Source, vec<L, T, Q>(Multiple));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> nextMultiple(vec<L, T, Q> const& Source, vec<L, T, Q> const& Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'nextMultiple' only accept integer inputs");
+
+ return detail::functor2<vec, L, T, Q>::call(nextMultiple, Source, Multiple);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> prevMultiple(vec<L, T, Q> const& Source, T Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'prevMultiple' only accept integer inputs");
+
+ return detail::functor2<vec, L, T, Q>::call(prevMultiple, Source, vec<L, T, Q>(Multiple));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> prevMultiple(vec<L, T, Q> const& Source, vec<L, T, Q> const& Multiple)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'prevMultiple' only accept integer inputs");
+
+ return detail::functor2<vec, L, T, Q>::call(prevMultiple, Source, Multiple);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, int, Q> findNSB(vec<L, T, Q> const& Source, vec<L, int, Q> SignificantBitCount)
+ {
+ GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'findNSB' only accept integer inputs");
+
+ return detail::functor2_vec_int<L, T, Q>::call(findNSB, Source, SignificantBitCount);
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/vector_packing.hpp b/src/include/glm/ext/vector_packing.hpp
new file mode 100644
index 0000000..e685233
--- /dev/null
+++ b/src/include/glm/ext/vector_packing.hpp
@@ -0,0 +1,32 @@
+/// @ref ext_vector_packing
+/// @file glm/ext/vector_packing.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup ext_vector_packing GLM_EXT_vector_packing
+/// @ingroup ext
+///
+/// Include <glm/ext/vector_packing.hpp> to use the features of this extension.
+///
+/// This extension provides a set of function to convert vectors to packed
+/// formats.
+
+#pragma once
+
+// Dependency:
+#include "../detail/qualifier.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_packing extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_packing
+ /// @{
+
+
+ /// @}
+}// namespace glm
+
+#include "vector_packing.inl"
diff --git a/src/include/glm/ext/vector_packing.inl b/src/include/glm/ext/vector_packing.inl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/include/glm/ext/vector_packing.inl
diff --git a/src/include/glm/ext/vector_relational.hpp b/src/include/glm/ext/vector_relational.hpp
new file mode 100644
index 0000000..e6bb989
--- /dev/null
+++ b/src/include/glm/ext/vector_relational.hpp
@@ -0,0 +1,107 @@
+/// @ref ext_vector_relational
+/// @file glm/ext/vector_relational.hpp
+///
+/// @see core (dependence)
+/// @see ext_scalar_integer (dependence)
+///
+/// @defgroup ext_vector_relational GLM_EXT_vector_relational
+/// @ingroup ext
+///
+/// Exposes comparison functions for vector types that take a user defined epsilon values.
+///
+/// Include <glm/ext/vector_relational.hpp> to use the features of this extension.
+///
+/// @see core_vector_relational
+/// @see ext_scalar_relational
+/// @see ext_matrix_relational
+
+#pragma once
+
+// Dependencies
+#include "../detail/qualifier.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_relational extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_relational
+ /// @{
+
+ /// Returns the component-wise comparison of |x - y| < epsilon.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
+
+ /// Returns the component-wise comparison of |x - y| < epsilon.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
+
+ /// Returns the component-wise comparison of |x - y| >= epsilon.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
+
+ /// Returns the component-wise comparison of |x - y| >= epsilon.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point or integer scalar types
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
+
+ /// Returns the component-wise comparison between two vectors in term of ULPs.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, int ULPs);
+
+ /// Returns the component-wise comparison between two vectors in term of ULPs.
+ /// True if this expression is satisfied.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, int, Q> const& ULPs);
+
+ /// Returns the component-wise comparison between two vectors in term of ULPs.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, int ULPs);
+
+ /// Returns the component-wise comparison between two vectors in term of ULPs.
+ /// True if this expression is not satisfied.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, int, Q> const& ULPs);
+
+ /// @}
+}//namespace glm
+
+#include "vector_relational.inl"
diff --git a/src/include/glm/ext/vector_relational.inl b/src/include/glm/ext/vector_relational.inl
new file mode 100644
index 0000000..4607eb1
--- /dev/null
+++ b/src/include/glm/ext/vector_relational.inl
@@ -0,0 +1,75 @@
+#include "../vector_relational.hpp"
+#include "../common.hpp"
+#include "../detail/qualifier.hpp"
+#include "../detail/type_float.hpp"
+
+namespace glm
+{
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T Epsilon)
+ {
+ return equal(x, y, vec<L, T, Q>(Epsilon));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& Epsilon)
+ {
+ return lessThanEqual(abs(x - y), Epsilon);
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T Epsilon)
+ {
+ return notEqual(x, y, vec<L, T, Q>(Epsilon));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& Epsilon)
+ {
+ return greaterThan(abs(x - y), Epsilon);
+ }
+
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, int MaxULPs)
+ {
+ return equal(x, y, vec<L, int, Q>(MaxULPs));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, int, Q> const& MaxULPs)
+ {
+ vec<L, bool, Q> Result(false);
+ for(length_t i = 0; i < L; ++i)
+ {
+ detail::float_t<T> const a(x[i]);
+ detail::float_t<T> const b(y[i]);
+
+ // Different signs means they do not match.
+ if(a.negative() != b.negative())
+ {
+ // Check for equality to make sure +0==-0
+ Result[i] = a.mantissa() == b.mantissa() && a.exponent() == b.exponent();
+ }
+ else
+ {
+ // Find the difference in ULPs.
+ typename detail::float_t<T>::int_type const DiffULPs = abs(a.i - b.i);
+ Result[i] = DiffULPs <= MaxULPs[i];
+ }
+ }
+ return Result;
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, int MaxULPs)
+ {
+ return notEqual(x, y, vec<L, int, Q>(MaxULPs));
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, int, Q> const& MaxULPs)
+ {
+ return not_(equal(x, y, MaxULPs));
+ }
+}//namespace glm
diff --git a/src/include/glm/ext/vector_uint1.hpp b/src/include/glm/ext/vector_uint1.hpp
new file mode 100644
index 0000000..74835b2
--- /dev/null
+++ b/src/include/glm/ext/vector_uint1.hpp
@@ -0,0 +1,32 @@
+/// @ref ext_vector_uint1
+/// @file glm/ext/vector_uint1.hpp
+///
+/// @defgroup ext_vector_uint1 GLM_EXT_vector_uint1
+/// @ingroup ext
+///
+/// Exposes uvec1 vector type.
+///
+/// Include <glm/ext/vector_uvec1.hpp> to use the features of this extension.
+///
+/// @see ext_vector_int1 extension.
+/// @see ext_vector_uint1_precision extension.
+
+#pragma once
+
+#include "../detail/type_vec1.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_uint1 extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_uint1
+ /// @{
+
+ /// 1 component vector of unsigned integer numbers.
+ typedef vec<1, unsigned int, defaultp> uvec1;
+
+ /// @}
+}//namespace glm
+
diff --git a/src/include/glm/ext/vector_uint1_sized.hpp b/src/include/glm/ext/vector_uint1_sized.hpp
new file mode 100644
index 0000000..f26d98a
--- /dev/null
+++ b/src/include/glm/ext/vector_uint1_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_vector_uint1_sized
+/// @file glm/ext/vector_uint1_sized.hpp
+///
+/// @defgroup ext_vector_uint1_sized GLM_EXT_vector_uint1_sized
+/// @ingroup ext
+///
+/// Exposes sized unsigned integer vector types.
+///
+/// Include <glm/ext/vector_uint1_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_uint_sized
+/// @see ext_vector_int1_sized
+
+#pragma once
+
+#include "../ext/vector_uint1.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_uint1_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_uint1_sized
+ /// @{
+
+ /// 8 bit unsigned integer vector of 1 component type.
+ ///
+ /// @see ext_vector_uint1_sized
+ typedef vec<1, uint8, defaultp> u8vec1;
+
+ /// 16 bit unsigned integer vector of 1 component type.
+ ///
+ /// @see ext_vector_uint1_sized
+ typedef vec<1, uint16, defaultp> u16vec1;
+
+ /// 32 bit unsigned integer vector of 1 component type.
+ ///
+ /// @see ext_vector_uint1_sized
+ typedef vec<1, uint32, defaultp> u32vec1;
+
+ /// 64 bit unsigned integer vector of 1 component type.
+ ///
+ /// @see ext_vector_uint1_sized
+ typedef vec<1, uint64, defaultp> u64vec1;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_uint2.hpp b/src/include/glm/ext/vector_uint2.hpp
new file mode 100644
index 0000000..bb5969a
--- /dev/null
+++ b/src/include/glm/ext/vector_uint2.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_uint2.hpp
+
+#pragma once
+#include "../detail/type_vec2.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 2 components vector of unsigned integer numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<2, unsigned int, defaultp> uvec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_uint2_sized.hpp b/src/include/glm/ext/vector_uint2_sized.hpp
new file mode 100644
index 0000000..9cef3a9
--- /dev/null
+++ b/src/include/glm/ext/vector_uint2_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_vector_uint2_sized
+/// @file glm/ext/vector_uint2_sized.hpp
+///
+/// @defgroup ext_vector_uint2_sized GLM_EXT_vector_uint2_sized
+/// @ingroup ext
+///
+/// Exposes sized unsigned integer vector of 2 components type.
+///
+/// Include <glm/ext/vector_uint2_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_uint_sized
+/// @see ext_vector_int2_sized
+
+#pragma once
+
+#include "../ext/vector_uint2.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_uint2_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_uint2_sized
+ /// @{
+
+ /// 8 bit unsigned integer vector of 2 components type.
+ ///
+ /// @see ext_vector_uint2_sized
+ typedef vec<2, uint8, defaultp> u8vec2;
+
+ /// 16 bit unsigned integer vector of 2 components type.
+ ///
+ /// @see ext_vector_uint2_sized
+ typedef vec<2, uint16, defaultp> u16vec2;
+
+ /// 32 bit unsigned integer vector of 2 components type.
+ ///
+ /// @see ext_vector_uint2_sized
+ typedef vec<2, uint32, defaultp> u32vec2;
+
+ /// 64 bit unsigned integer vector of 2 components type.
+ ///
+ /// @see ext_vector_uint2_sized
+ typedef vec<2, uint64, defaultp> u64vec2;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_uint3.hpp b/src/include/glm/ext/vector_uint3.hpp
new file mode 100644
index 0000000..f447592
--- /dev/null
+++ b/src/include/glm/ext/vector_uint3.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_uint3.hpp
+
+#pragma once
+#include "../detail/type_vec3.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 3 components vector of unsigned integer numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<3, unsigned int, defaultp> uvec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_uint3_sized.hpp b/src/include/glm/ext/vector_uint3_sized.hpp
new file mode 100644
index 0000000..fd4ea37
--- /dev/null
+++ b/src/include/glm/ext/vector_uint3_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_vector_uint3_sized
+/// @file glm/ext/vector_uint3_sized.hpp
+///
+/// @defgroup ext_vector_uint3_sized GLM_EXT_vector_uint3_sized
+/// @ingroup ext
+///
+/// Exposes sized unsigned integer vector of 3 components type.
+///
+/// Include <glm/ext/vector_uint3_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_uint_sized
+/// @see ext_vector_int3_sized
+
+#pragma once
+
+#include "../ext/vector_uint3.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_uint3_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_uint3_sized
+ /// @{
+
+ /// 8 bit unsigned integer vector of 3 components type.
+ ///
+ /// @see ext_vector_uint3_sized
+ typedef vec<3, uint8, defaultp> u8vec3;
+
+ /// 16 bit unsigned integer vector of 3 components type.
+ ///
+ /// @see ext_vector_uint3_sized
+ typedef vec<3, uint16, defaultp> u16vec3;
+
+ /// 32 bit unsigned integer vector of 3 components type.
+ ///
+ /// @see ext_vector_uint3_sized
+ typedef vec<3, uint32, defaultp> u32vec3;
+
+ /// 64 bit unsigned integer vector of 3 components type.
+ ///
+ /// @see ext_vector_uint3_sized
+ typedef vec<3, uint64, defaultp> u64vec3;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_uint4.hpp b/src/include/glm/ext/vector_uint4.hpp
new file mode 100644
index 0000000..73e028e
--- /dev/null
+++ b/src/include/glm/ext/vector_uint4.hpp
@@ -0,0 +1,18 @@
+/// @ref core
+/// @file glm/ext/vector_uint4.hpp
+
+#pragma once
+#include "../detail/type_vec4.hpp"
+
+namespace glm
+{
+ /// @addtogroup core_vector
+ /// @{
+
+ /// 4 components vector of unsigned integer numbers.
+ ///
+ /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>
+ typedef vec<4, unsigned int, defaultp> uvec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_uint4_sized.hpp b/src/include/glm/ext/vector_uint4_sized.hpp
new file mode 100644
index 0000000..6ccd145
--- /dev/null
+++ b/src/include/glm/ext/vector_uint4_sized.hpp
@@ -0,0 +1,49 @@
+/// @ref ext_vector_uint4_sized
+/// @file glm/ext/vector_uint4_sized.hpp
+///
+/// @defgroup ext_vector_uint4_sized GLM_EXT_vector_uint4_sized
+/// @ingroup ext
+///
+/// Exposes sized unsigned integer vector of 4 components type.
+///
+/// Include <glm/ext/vector_uint4_sized.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_uint_sized
+/// @see ext_vector_int4_sized
+
+#pragma once
+
+#include "../ext/vector_uint4.hpp"
+#include "../ext/scalar_uint_sized.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_uint4_sized extension included")
+#endif
+
+namespace glm
+{
+ /// @addtogroup ext_vector_uint4_sized
+ /// @{
+
+ /// 8 bit unsigned integer vector of 4 components type.
+ ///
+ /// @see ext_vector_uint4_sized
+ typedef vec<4, uint8, defaultp> u8vec4;
+
+ /// 16 bit unsigned integer vector of 4 components type.
+ ///
+ /// @see ext_vector_uint4_sized
+ typedef vec<4, uint16, defaultp> u16vec4;
+
+ /// 32 bit unsigned integer vector of 4 components type.
+ ///
+ /// @see ext_vector_uint4_sized
+ typedef vec<4, uint32, defaultp> u32vec4;
+
+ /// 64 bit unsigned integer vector of 4 components type.
+ ///
+ /// @see ext_vector_uint4_sized
+ typedef vec<4, uint64, defaultp> u64vec4;
+
+ /// @}
+}//namespace glm
diff --git a/src/include/glm/ext/vector_ulp.hpp b/src/include/glm/ext/vector_ulp.hpp
new file mode 100644
index 0000000..1903fbf
--- /dev/null
+++ b/src/include/glm/ext/vector_ulp.hpp
@@ -0,0 +1,109 @@
+/// @ref ext_vector_ulp
+/// @file glm/ext/vector_ulp.hpp
+///
+/// @defgroup ext_vector_ulp GLM_EXT_vector_ulp
+/// @ingroup ext
+///
+/// Allow the measurement of the accuracy of a function against a reference
+/// implementation. This extension works on floating-point data and provide results
+/// in ULP.
+///
+/// Include <glm/ext/vector_ulp.hpp> to use the features of this extension.
+///
+/// @see ext_scalar_ulp
+/// @see ext_scalar_relational
+/// @see ext_vector_relational
+
+#pragma once
+
+// Dependencies
+#include "../ext/scalar_ulp.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# pragma message("GLM: GLM_EXT_vector_ulp extension included")
+#endif
+
+namespace glm
+{
+ /// Return the next ULP value(s) after the input value(s).
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_scalar_ulp
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> nextFloat(vec<L, T, Q> const& x);
+
+ /// Return the value(s) ULP distance after the input value(s).
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_scalar_ulp
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> nextFloat(vec<L, T, Q> const& x, int ULPs);
+
+ /// Return the value(s) ULP distance after the input value(s).
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_scalar_ulp
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> nextFloat(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs);
+
+ /// Return the previous ULP value(s) before the input value(s).
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_scalar_ulp
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> prevFloat(vec<L, T, Q> const& x);
+
+ /// Return the value(s) ULP distance before the input value(s).
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_scalar_ulp
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> prevFloat(vec<L, T, Q> const& x, int ULPs);
+
+ /// Return the value(s) ULP distance before the input value(s).
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam T Floating-point
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_scalar_ulp
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> prevFloat(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs);
+
+ /// Return the distance in the number of ULP between 2 single-precision floating-point scalars.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_scalar_ulp
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, int, Q> floatDistance(vec<L, float, Q> const& x, vec<L, float, Q> const& y);
+
+ /// Return the distance in the number of ULP between 2 double-precision floating-point scalars.
+ ///
+ /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
+ /// @tparam Q Value from qualifier enum
+ ///
+ /// @see ext_scalar_ulp
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, int64, Q> floatDistance(vec<L, double, Q> const& x, vec<L, double, Q> const& y);
+
+ /// @}
+}//namespace glm
+
+#include "vector_ulp.inl"
diff --git a/src/include/glm/ext/vector_ulp.inl b/src/include/glm/ext/vector_ulp.inl
new file mode 100644
index 0000000..d4b84cb
--- /dev/null
+++ b/src/include/glm/ext/vector_ulp.inl
@@ -0,0 +1,74 @@
+namespace glm
+{
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> nextFloat(vec<L, T, Q> const& x)
+ {
+ vec<L, T, Q> Result;
+ for(length_t i = 0, n = Result.length(); i < n; ++i)
+ Result[i] = nextFloat(x[i]);
+ return Result;
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> nextFloat(vec<L, T, Q> const& x, int ULPs)
+ {
+ vec<L, T, Q> Result;
+ for(length_t i = 0, n = Result.length(); i < n; ++i)
+ Result[i] = nextFloat(x[i], ULPs);
+ return Result;
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> nextFloat(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs)
+ {
+ vec<L, T, Q> Result;
+ for(length_t i = 0, n = Result.length(); i < n; ++i)
+ Result[i] = nextFloat(x[i], ULPs[i]);
+ return Result;
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> prevFloat(vec<L, T, Q> const& x)
+ {
+ vec<L, T, Q> Result;
+ for(length_t i = 0, n = Result.length(); i < n; ++i)
+ Result[i] = prevFloat(x[i]);
+ return Result;
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> prevFloat(vec<L, T, Q> const& x, int ULPs)
+ {
+ vec<L, T, Q> Result;
+ for(length_t i = 0, n = Result.length(); i < n; ++i)
+ Result[i] = prevFloat(x[i], ULPs);
+ return Result;
+ }
+
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, T, Q> prevFloat(vec<L, T, Q> const& x, vec<L, int, Q> const& ULPs)
+ {
+ vec<L, T, Q> Result;
+ for(length_t i = 0, n = Result.length(); i < n; ++i)
+ Result[i] = prevFloat(x[i], ULPs[i]);
+ return Result;
+ }
+
+ template<length_t L, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, int, Q> floatDistance(vec<L, float, Q> const& x, vec<L, float, Q> const& y)
+ {
+ vec<L, int, Q> Result;
+ for(length_t i = 0, n = Result.length(); i < n; ++i)
+ Result[i] = floatDistance(x[i], y[i]);
+ return Result;
+ }
+
+ template<length_t L, qualifier Q>
+ GLM_FUNC_QUALIFIER vec<L, int64, Q> floatDistance(vec<L, double, Q> const& x, vec<L, double, Q> const& y)
+ {
+ vec<L, int64, Q> Result;
+ for(length_t i = 0, n = Result.length(); i < n; ++i)
+ Result[i] = floatDistance(x[i], y[i]);
+ return Result;
+ }
+}//namespace glm