瀏覽代碼

Added files for GLM_GTX_ulp extension

Christophe Riccio 15 年之前
父節點
當前提交
787a60956f
共有 3 個文件被更改,包括 51 次插入0 次删除
  1. 1 0
      glm/ext.hpp
  2. 50 0
      glm/gtx/ulp.hpp
  3. 0 0
      glm/gtx/ulp.inl

+ 1 - 0
glm/ext.hpp

@@ -73,6 +73,7 @@
 #include "./gtx/string_cast.hpp"
 #include "./gtx/transform.hpp"
 #include "./gtx/transform2.hpp"
+#include "./gtx/ulp.hpp"
 #include "./gtx/unsigned_int.hpp"
 #include "./gtx/vec1.hpp"
 #include "./gtx/vector_access.hpp"

+ 50 - 0
glm/gtx/ulp.hpp

@@ -0,0 +1,50 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Created : 2011-02-21
+// Updated : 2009-02-21
+// Licence : This source is under MIT License
+// File    : glm/gtx/ulp.hpp
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Dependency:
+// - GLM core
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef glm_gtx_ulp
+#define glm_gtx_ulp
+
+// Dependency:
+#include "../glm.hpp"
+
+#if(defined(GLM_MESSAGES) && !defined(glm_ext))
+#	pragma message("GLM: GLM_GTX_ulp extension included")
+#endif
+
+namespace glm
+{
+	namespace gtx{
+	//! GLM_GTX_ulp extension: Precision calculation functions
+	namespace spline
+	{
+		/// \addtogroup gtx_ulp
+		///@{
+
+		//! Return the number of ULP between 2 variables.
+		//! From GLM_GTX_ulp extension.
+		template <typename genType>
+		genIType ulp(
+			genType const & a,
+			genType const & b);
+
+		///@}
+
+	}//namespace ulp
+	}//namespace gtx
+}//namespace glm
+
+#include "spline.inl"
+
+namespace glm{using namespace gtx::spline;}
+
+#endif//glm_gtx_spline
+

+ 0 - 0
glm/gtx/ulp.inl