2011-06-09 07:38:05 +00:00
/// @ref gtx_fast_exponential
/// @file glm/gtx/fast_exponential.hpp
2011-06-07 23:58:37 +00:00
///
/// @see core (dependence)
2011-06-09 07:38:05 +00:00
/// @see gtx_half_float (dependence)
2011-06-07 23:58:37 +00:00
///
2012-11-13 16:54:11 +00:00
/// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential
2011-06-09 07:38:05 +00:00
/// @ingroup gtx
2016-05-23 20:55:49 +00:00
///
2017-08-17 14:24:32 +00:00
/// Include <glm/gtx/fast_exponential.hpp> to use the features of this extension.
2016-05-23 20:55:49 +00:00
///
2017-08-17 14:24:32 +00:00
/// Fast but less accurate implementations of exponential based functions.
2011-06-07 23:58:37 +00:00
2014-07-13 23:48:27 +00:00
# pragma once
2010-04-29 10:54:07 +00:00
// Dependency:
# include "../glm.hpp"
2016-11-12 13:19:22 +00:00
# ifndef GLM_ENABLE_EXPERIMENTAL
2016-11-30 19:26:35 +00:00
# error "GLM: GLM_GTX_fast_exponential is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
2016-11-12 13:19:22 +00:00
# endif
2016-09-01 22:30:37 +00:00
# if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
2011-01-19 17:10:55 +00:00
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
# endif
2011-06-10 15:45:17 +00:00
namespace glm
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-12-07 14:50:15 +00:00
/// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential
2016-12-30 19:05:04 +00:00
template < typename genType >
2014-11-01 00:44:37 +00:00
GLM_FUNC_DECL genType fastPow ( genType x , genType y ) ;
2010-04-29 10:54:07 +00:00
2011-12-07 14:50:15 +00:00
/// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential
2017-08-15 23:22:50 +00:00
template < length_t L , typename T , qualifier Q >
GLM_FUNC_DECL vec < L , T , Q > fastPow ( vec < L , T , Q > const & x , vec < L , T , Q > const & y ) ;
2014-11-01 00:44:37 +00:00
/// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential
2016-12-30 19:05:04 +00:00
template < typename genTypeT , typename genTypeU >
2014-11-01 00:44:37 +00:00
GLM_FUNC_DECL genTypeT fastPow ( genTypeT x , genTypeU y ) ;
/// Faster than the common pow function but less accurate.
/// @see gtx_fast_exponential
2017-08-15 23:22:50 +00:00
template < length_t L , typename T , qualifier Q >
GLM_FUNC_DECL vec < L , T , Q > fastPow ( vec < L , T , Q > const & x ) ;
2014-11-01 00:44:37 +00:00
/// Faster than the common exp function but less accurate.
/// @see gtx_fast_exponential
2016-12-30 19:05:04 +00:00
template < typename T >
2014-11-01 00:44:37 +00:00
GLM_FUNC_DECL T fastExp ( T x ) ;
2011-12-07 14:50:15 +00:00
/// Faster than the common exp function but less accurate.
/// @see gtx_fast_exponential
2017-08-15 23:22:50 +00:00
template < length_t L , typename T , qualifier Q >
GLM_FUNC_DECL vec < L , T , Q > fastExp ( vec < L , T , Q > const & x ) ;
2014-11-01 00:44:37 +00:00
2011-12-07 14:50:15 +00:00
/// Faster than the common log function but less accurate.
/// @see gtx_fast_exponential
2016-12-30 19:05:04 +00:00
template < typename T >
2014-11-01 00:44:37 +00:00
GLM_FUNC_DECL T fastLog ( T x ) ;
2010-04-29 10:54:07 +00:00
2011-12-07 14:50:15 +00:00
/// Faster than the common exp2 function but less accurate.
/// @see gtx_fast_exponential
2017-08-15 23:22:50 +00:00
template < length_t L , typename T , qualifier Q >
GLM_FUNC_DECL vec < L , T , Q > fastLog ( vec < L , T , Q > const & x ) ;
2014-11-01 00:44:37 +00:00
/// Faster than the common exp2 function but less accurate.
/// @see gtx_fast_exponential
2016-12-30 19:05:04 +00:00
template < typename T >
2014-11-01 00:44:37 +00:00
GLM_FUNC_DECL T fastExp2 ( T x ) ;
/// Faster than the common exp2 function but less accurate.
/// @see gtx_fast_exponential
2017-08-15 23:22:50 +00:00
template < length_t L , typename T , qualifier Q >
GLM_FUNC_DECL vec < L , T , Q > fastExp2 ( vec < L , T , Q > const & x ) ;
2014-11-01 00:44:37 +00:00
2011-12-07 14:50:15 +00:00
/// Faster than the common log2 function but less accurate.
/// @see gtx_fast_exponential
2016-12-30 19:05:04 +00:00
template < typename T >
2014-11-01 00:44:37 +00:00
GLM_FUNC_DECL T fastLog2 ( T x ) ;
2010-04-29 10:54:07 +00:00
2014-11-01 00:44:37 +00:00
/// Faster than the common log2 function but less accurate.
2011-12-07 14:50:15 +00:00
/// @see gtx_fast_exponential
2017-08-15 23:22:50 +00:00
template < length_t L , typename T , qualifier Q >
GLM_FUNC_DECL vec < L , T , Q > fastLog2 ( vec < L , T , Q > const & x ) ;
2010-04-29 10:54:07 +00:00
2011-05-18 14:38:03 +00:00
/// @}
2010-04-29 10:54:07 +00:00
} //namespace glm
# include "fast_exponential.inl"