Promoted the ULP extension

This commit is contained in:
Christophe Riccio 2011-12-12 14:53:30 +00:00
parent 74c7268f4d
commit ee00387d2d
2 changed files with 25 additions and 25 deletions

View File

@ -20,64 +20,64 @@
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE. /// THE SOFTWARE.
/// ///
/// @ref gtx_ulp /// @ref gtc_ulp
/// @file glm/gtx/ulp.hpp /// @file glm/gtc/ulp.hpp
/// @date 2011-02-21 / 2011-06-07 /// @date 2011-02-21 / 2011-12-12
/// @author Christophe Riccio /// @author Christophe Riccio
/// ///
/// @see core (dependence) /// @see core (dependence)
/// ///
/// @defgroup gtx_ulp GLM_GTX_ulp: Accuracy measurement /// @defgroup gtc_ulp GLM_GTC_ulp: Accuracy measurement
/// @ingroup gtx /// @ingroup gtc
/// ///
/// @brief Allow the measurement of the accuracy of a function against a reference /// @brief Allow the measurement of the accuracy of a function against a reference
/// implementation. This extension works on floating-point data and provide results /// implementation. This extension works on floating-point data and provide results
/// in ULP. /// in ULP.
/// <glm/gtx/ulp.hpp> need to be included to use these functionalities. /// <glm/gtc/ulp.hpp> need to be included to use these functionalities.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_GTX_ulp #ifndef GLM_GTC_ulp
#define GLM_GTX_ulp GLM_VERSION #define GLM_GTC_ulp GLM_VERSION
// Dependency: // Dependency:
#include "../glm.hpp" #include "../glm.hpp"
#if(defined(GLM_MESSAGES) && !defined(glm_ext)) #if(defined(GLM_MESSAGES) && !defined(glm_ext))
# pragma message("GLM: GLM_GTX_ulp extension included") # pragma message("GLM: GLM_GTC_ulp extension included")
#endif #endif
namespace glm namespace glm
{ {
/// @addtogroup gtx_ulp /// @addtogroup gtc_ulp
/// @{ /// @{
//! Return the next ULP value(s) after the input value(s). /// Return the next ULP value(s) after the input value(s).
//! From GLM_GTX_ulp extension. /// @see gtc_ulp
template <typename genType> template <typename genType>
genType next_float(genType const & x); genType next_float(genType const & x);
//! Return the previous ULP value(s) before the input value(s). /// Return the previous ULP value(s) before the input value(s).
//! From GLM_GTX_ulp extension. /// @see gtc_ulp
template <typename genType> template <typename genType>
genType prev_float(genType const & x); genType prev_float(genType const & x);
//! Return the value(s) ULP distance after the input value(s). /// Return the value(s) ULP distance after the input value(s).
//! From GLM_GTX_ulp extension. /// @see gtc_ulp
template <typename genType> template <typename genType>
genType next_float(genType const & x, uint const & Distance); genType next_float(genType const & x, uint const & Distance);
//! Return the value(s) ULP distance before the input value(s). /// Return the value(s) ULP distance before the input value(s).
//! From GLM_GTX_ulp extension. /// @see gtc_ulp
template <typename genType> template <typename genType>
genType prev_float(genType const & x, uint const & Distance); genType prev_float(genType const & x, uint const & Distance);
//! Return the distance in the number of ULP between 2 scalars. /// Return the distance in the number of ULP between 2 scalars.
//! From GLM_GTX_ulp extension. /// @see gtc_ulp
template <typename T> template <typename T>
uint float_distance(T const & x, T const & y); uint float_distance(T const & x, T const & y);
//! Return the distance in the number of ULP between 2 vectors. /// Return the distance in the number of ULP between 2 vectors.
//! From GLM_GTX_ulp extension. /// @see gtc_ulp
template<typename T, template<typename> class vecType> template<typename T, template<typename> class vecType>
vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y); vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
@ -86,5 +86,5 @@ namespace glm
#include "ulp.inl" #include "ulp.inl"
#endif//GLM_GTX_ulp #endif//GLM_GTC_ulp

View File

@ -2,9 +2,9 @@
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2011-03-07 // Created : 2011-03-07
// Updated : 2011-04-26 // Updated : 2011-12-12
// Licence : This source is under MIT License // Licence : This source is under MIT License
// File : glm/gtx/ulp.inl // File : glm/gtc/ulp.inl
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include <cmath> #include <cmath>