glm/glm/gtx/fast_exponential.hpp

77 lines
2.2 KiB
C++
Raw Normal View History

2010-04-29 10:54:07 +00:00
///////////////////////////////////////////////////////////////////////////////////////////////////
2011-01-20 11:40:14 +00:00
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
2010-04-29 10:54:07 +00:00
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2006-01-09
// Updated : 2006-11-13
// Licence : This source is under MIT License
// File : glm/gtx/fast_exponential.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
// Dependency:
// - GLM core
2010-11-12 17:41:38 +00:00
// - GLM_GTC_half_float
2010-04-29 10:54:07 +00:00
///////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtx_fast_exponential
#define glm_gtx_fast_exponential
// Dependency:
#include "../glm.hpp"
#include "../gtc/half_float.hpp"
2011-01-19 17:10:55 +00:00
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
#endif
2011-05-18 14:38:03 +00:00
namespace glm{
2011-06-07 10:28:11 +00:00
namespace gtx
2010-04-29 10:54:07 +00:00
{
2011-06-07 00:19:48 +00:00
/// @addtogroup gtx_fast_exponential
2011-05-18 14:38:03 +00:00
/// @{
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
//! Faster than the common pow function but less accurate.
//! From GLM_GTX_fast_exponential extension.
template <typename valType>
valType fastPow(
valType const & x,
valType const & y);
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
//! Faster than the common pow function but less accurate.
//! From GLM_GTX_fast_exponential extension.
template <typename T, typename U>
T fastPow(
const T& x,
const U& y);
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
//! Faster than the common exp function but less accurate.
//! From GLM_GTX_fast_exponential extension.
template <typename T>
T fastExp(const T& x);
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
//! Faster than the common log function but less accurate.
//! From GLM_GTX_fast_exponential extension.
template <typename T>
T fastLog(const T& x);
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
//! Faster than the common exp2 function but less accurate.
//! From GLM_GTX_fast_exponential extension.
template <typename T>
T fastExp2(const T& x);
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
//! Faster than the common log2 function but less accurate.
//! From GLM_GTX_fast_exponential extension.
template <typename T>
T fastLog2(const T& x);
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
//! Faster than the common ln function but less accurate.
//! From GLM_GTX_fast_exponential extension.
template <typename T>
T fastLn(const T& x);
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
/// @}
}//namespace gtx
2010-04-29 10:54:07 +00:00
}//namespace glm
#include "fast_exponential.inl"
#endif//glm_gtx_fast_exponential