0.9.9 API documenation
Functions
Exponential functions

These all operate component-wise. More...

Functions

template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > exp (vec< L, T, P > const &v)
 Returns the natural exponentiation of x, i.e., e^x. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > exp2 (vec< L, T, P > const &v)
 Returns 2 raised to the v power. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > inversesqrt (vec< L, T, P > const &v)
 Returns the reciprocal of the positive square root of v. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > log (vec< L, T, P > const &v)
 Returns the natural logarithm of v, i.e., returns the value y which satisfies the equation x = e^y. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > log2 (vec< L, T, P > const &v)
 Returns the base 2 log of x, i.e., returns the value y, which satisfies the equation x = 2 ^ y. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > pow (vec< L, T, P > const &base, vec< L, T, P > const &exponent)
 Returns 'base' raised to the power 'exponent'. More...
 
template<length_t L, typename T , qualifier P>
GLM_FUNC_DECL vec< L, T, P > sqrt (vec< L, T, P > const &v)
 Returns the positive square root of v. More...
 

Detailed Description

These all operate component-wise.

The description is per component.

Function Documentation

GLM_FUNC_DECL vec<L, T, P> glm::exp ( vec< L, T, P > const &  v)

Returns the natural exponentiation of x, i.e., e^x.

Parameters
vexp function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type qualifier.
Template Parameters
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
See also
GLSL exp man page
GLSL 4.20.8 specification, section 8.2 Exponential Functions
GLM_FUNC_DECL vec<L, T, P> glm::exp2 ( vec< L, T, P > const &  v)

Returns 2 raised to the v power.

Parameters
vexp2 function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type qualifier.
Template Parameters
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
See also
GLSL exp2 man page
GLSL 4.20.8 specification, section 8.2 Exponential Functions
GLM_FUNC_DECL vec<L, T, P> glm::inversesqrt ( vec< L, T, P > const &  v)

Returns the reciprocal of the positive square root of v.

Parameters
vinversesqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type qualifier.
Template Parameters
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
See also
GLSL inversesqrt man page
GLSL 4.20.8 specification, section 8.2 Exponential Functions
GLM_FUNC_DECL vec<L, T, P> glm::log ( vec< L, T, P > const &  v)

Returns the natural logarithm of v, i.e., returns the value y which satisfies the equation x = e^y.

Results are undefined if v <= 0.

Parameters
vlog function is defined for input values of v defined in the range (0, inf+) in the limit of the type qualifier.
Template Parameters
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
See also
GLSL log man page
GLSL 4.20.8 specification, section 8.2 Exponential Functions
GLM_FUNC_DECL vec<L, T, P> glm::log2 ( vec< L, T, P > const &  v)

Returns the base 2 log of x, i.e., returns the value y, which satisfies the equation x = 2 ^ y.

Parameters
vlog2 function is defined for input values of v defined in the range (0, inf+) in the limit of the type qualifier.
Template Parameters
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
See also
GLSL log2 man page
GLSL 4.20.8 specification, section 8.2 Exponential Functions
GLM_FUNC_DECL vec<L, T, P> glm::pow ( vec< L, T, P > const &  base,
vec< L, T, P > const &  exponent 
)

Returns 'base' raised to the power 'exponent'.

Parameters
baseFloating point value. pow function is defined for input values of 'base' defined in the range (inf-, inf+) in the limit of the type qualifier.
exponentFloating point value representing the 'exponent'.
See also
GLSL pow man page
GLSL 4.20.8 specification, section 8.2 Exponential Functions
GLM_FUNC_DECL vec<L, T, P> glm::sqrt ( vec< L, T, P > const &  v)

Returns the positive square root of v.

Parameters
vsqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type qualifier.
Template Parameters
LAn integer between 1 and 4 included that qualify the dimension of the vector.
TFloating-point scalar types.
See also
GLSL sqrt man page
GLSL 4.20.8 specification, section 8.2 Exponential Functions