瀏覽代碼

Merge branch 'dev' of https://github.com/g-truc/glm into dev

Christophe Riccio 7 年之前
父節點
當前提交
3b607947a7
共有 3 個文件被更改,包括 26 次插入6 次删除
  1. 1 0
      glm/ext/scalar_ulp.hpp
  2. 1 0
      glm/ext/scalar_ulp.inl
  3. 24 6
      glm/ext/vector_ulp.hpp

+ 1 - 0
glm/ext/scalar_ulp.hpp

@@ -17,6 +17,7 @@
 
 
 // Dependencies
 // Dependencies
 #include "../ext/scalar_int_sized.hpp"
 #include "../ext/scalar_int_sized.hpp"
+#include "../common.hpp"
 #include "../detail/qualifier.hpp"
 #include "../detail/qualifier.hpp"
 
 
 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)

+ 1 - 0
glm/ext/scalar_ulp.inl

@@ -7,6 +7,7 @@
 
 
 #include "../detail/type_float.hpp"
 #include "../detail/type_float.hpp"
 #include "../ext/scalar_constants.hpp"
 #include "../ext/scalar_constants.hpp"
+#include <cmath>
 
 
 #if(GLM_COMPILER & GLM_COMPILER_VC)
 #if(GLM_COMPILER & GLM_COMPILER_VC)
 #	pragma warning(push)
 #	pragma warning(push)

+ 24 - 6
glm/ext/vector_ulp.hpp

@@ -27,7 +27,9 @@ namespace glm
 {
 {
 	/// Return the next ULP value(s) after the input value(s).
 	/// Return the next ULP value(s) after the input value(s).
 	///
 	///
-	/// @tparam genType A floating-point scalar type.
+	/// @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
 	/// @see ext_scalar_ulp
 	template<length_t L, typename T, qualifier Q>
 	template<length_t L, typename T, qualifier Q>
@@ -35,7 +37,9 @@ namespace glm
 
 
 	/// Return the value(s) ULP distance after the input value(s).
 	/// Return the value(s) ULP distance after the input value(s).
 	///
 	///
-	/// @tparam genType A floating-point scalar type.
+	/// @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
 	/// @see ext_scalar_ulp
 	template<length_t L, typename T, qualifier Q>
 	template<length_t L, typename T, qualifier Q>
@@ -43,7 +47,9 @@ namespace glm
 
 
 	/// Return the value(s) ULP distance after the input value(s).
 	/// Return the value(s) ULP distance after the input value(s).
 	///
 	///
-	/// @tparam genType A floating-point scalar type.
+	/// @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
 	/// @see ext_scalar_ulp
 	template<length_t L, typename T, qualifier Q>
 	template<length_t L, typename T, qualifier Q>
@@ -51,7 +57,9 @@ namespace glm
 
 
 	/// Return the previous ULP value(s) before the input value(s).
 	/// Return the previous ULP value(s) before the input value(s).
 	///
 	///
-	/// @tparam genType A floating-point scalar type.
+	/// @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
 	/// @see ext_scalar_ulp
 	template<length_t L, typename T, qualifier Q>
 	template<length_t L, typename T, qualifier Q>
@@ -59,7 +67,9 @@ namespace glm
 
 
 	/// Return the value(s) ULP distance before the input value(s).
 	/// Return the value(s) ULP distance before the input value(s).
 	///
 	///
-	/// @tparam genType A floating-point scalar type.
+	/// @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
 	/// @see ext_scalar_ulp
 	template<length_t L, typename T, qualifier Q>
 	template<length_t L, typename T, qualifier Q>
@@ -67,7 +77,9 @@ namespace glm
 
 
 	/// Return the value(s) ULP distance before the input value(s).
 	/// Return the value(s) ULP distance before the input value(s).
 	///
 	///
-	/// @tparam genType A floating-point scalar type.
+	/// @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
 	/// @see ext_scalar_ulp
 	template<length_t L, typename T, qualifier Q>
 	template<length_t L, typename T, qualifier Q>
@@ -75,12 +87,18 @@ namespace glm
 
 
 	/// Return the distance in the number of ULP between 2 single-precision floating-point scalars.
 	/// 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
 	/// @see ext_scalar_ulp
 	template<length_t L, typename T, qualifier Q>
 	template<length_t L, typename T, qualifier Q>
 	GLM_FUNC_DECL vec<L, int, Q> float_distance(vec<L, float, Q> const& x, vec<L, float, Q> const& y);
 	GLM_FUNC_DECL vec<L, int, Q> float_distance(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.
 	/// 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
 	/// @see ext_scalar_ulp
 	template<length_t L, typename T, qualifier Q>
 	template<length_t L, typename T, qualifier Q>
 	GLM_FUNC_DECL vec<L, int64, Q> float_distance(vec<L, double, Q> const& x, vec<L, double, Q> const& y);
 	GLM_FUNC_DECL vec<L, int64, Q> float_distance(vec<L, double, Q> const& x, vec<L, double, Q> const& y);