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
/// THE SOFTWARE.
///
/// @ref gtx_ulp
/// @file glm/gtx/ulp.hpp
/// @date 2011-02-21 / 2011-06-07
/// @ref gtc_ulp
/// @file glm/gtc/ulp.hpp
/// @date 2011-02-21 / 2011-12-12
/// @author Christophe Riccio
///
/// @see core (dependence)
///
/// @defgroup gtx_ulp GLM_GTX_ulp: Accuracy measurement
/// @ingroup gtx
/// @defgroup gtc_ulp GLM_GTC_ulp: Accuracy measurement
/// @ingroup gtc
///
/// @brief 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.
/// <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
#define GLM_GTX_ulp GLM_VERSION
#ifndef GLM_GTC_ulp
#define GLM_GTC_ulp GLM_VERSION
// Dependency:
#include "../glm.hpp"
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
# pragma message("GLM: GLM_GTX_ulp extension included")
# pragma message("GLM: GLM_GTC_ulp extension included")
#endif
namespace glm
{
/// @addtogroup gtx_ulp
/// @addtogroup gtc_ulp
/// @{
//! Return the next ULP value(s) after the input value(s).
//! From GLM_GTX_ulp extension.
/// Return the next ULP value(s) after the input value(s).
/// @see gtc_ulp
template <typename genType>
genType next_float(genType const & x);
//! Return the previous ULP value(s) before the input value(s).
//! From GLM_GTX_ulp extension.
/// Return the previous ULP value(s) before the input value(s).
/// @see gtc_ulp
template <typename genType>
genType prev_float(genType const & x);
//! Return the value(s) ULP distance after the input value(s).
//! From GLM_GTX_ulp extension.
/// Return the value(s) ULP distance after the input value(s).
/// @see gtc_ulp
template <typename genType>
genType next_float(genType const & x, uint const & Distance);
//! Return the value(s) ULP distance before the input value(s).
//! From GLM_GTX_ulp extension.
/// Return the value(s) ULP distance before the input value(s).
/// @see gtc_ulp
template <typename genType>
genType prev_float(genType const & x, uint const & Distance);
//! Return the distance in the number of ULP between 2 scalars.
//! From GLM_GTX_ulp extension.
/// Return the distance in the number of ULP between 2 scalars.
/// @see gtc_ulp
template <typename T>
uint float_distance(T const & x, T const & y);
//! Return the distance in the number of ULP between 2 vectors.
//! From GLM_GTX_ulp extension.
/// Return the distance in the number of ULP between 2 vectors.
/// @see gtc_ulp
template<typename T, template<typename> class vecType>
vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);
@ -86,5 +86,5 @@ namespace glm
#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)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2011-03-07
// Updated : 2011-04-26
// Updated : 2011-12-12
// Licence : This source is under MIT License
// File : glm/gtx/ulp.inl
// File : glm/gtc/ulp.inl
///////////////////////////////////////////////////////////////////////////////////////////////////
#include <cmath>