| 0.9.6

- Main Page
- Modules
- Files

Functions
Exponential functions
GLM Core

## Functions

template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > | exp (vecType< T, P > const &v)
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > | exp2 (vecType< T, P > const &v)
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > | inversesqrt (vecType< T, P > const &v)
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > | log (vecType< T, P > const &v)
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > | log2 (vecType< T, P > const &v)
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > | pow (vecType< T, P > const &base, vecType< T, P > const &exponent)
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > | sqrt (vecType< T, P > const &v)

## Detailed Description

These all operate component-wise.

The description is per component.

## Function Documentation

GLM_FUNC_DECL vecType<T, P> glm::exp | ( | vecType< T, P > const & | v | ) |

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

Parameters

  v | exp function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type precision.

Template Parameters

  genType | Floating-point scalar or vector types.

See also
  GLSL exp man page
  GLSL 4.20.8 specification, section 8.2 Exponential Functions

GLM_FUNC_DECL vecType<T, P> glm::exp2 | ( | vecType< T, P > const & | v | ) |

Returns 2 raised to the v power.

Parameters

  v | exp2 function is defined for input values of v defined in the range (inf-, inf+) in the limit of the type precision.

Template Parameters

  genType | Floating-point scalar or vector types.

See also
  GLSL exp2 man page
  GLSL 4.20.8 specification, section 8.2 Exponential Functions

GLM_FUNC_DECL vecType<T, P> glm::inversesqrt | ( | vecType< T, P > const & | v | ) |

Returns the reciprocal of the positive square root of v.

Parameters

  v | inversesqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type precision.

Template Parameters

  genType | Floating-point scalar or vector types.

See also
  GLSL inversesqrt man page
  GLSL 4.20.8 specification, section 8.2 Exponential Functions

GLM_FUNC_DECL vecType<T, P> glm::log | ( | vecType< 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

  v | log function is defined for input values of v defined in the range (0, inf+) in the limit of the type precision.

Template Parameters

  genType | Floating-point scalar or vector types.

See also
  GLSL log man page
  GLSL 4.20.8 specification, section 8.2 Exponential Functions

GLM_FUNC_DECL vecType<T, P> glm::log2 | ( | vecType< 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

  v | log2 function is defined for input values of v defined in the range (0, inf+) in the limit of the type precision.

Template Parameters

  genType | Floating-point scalar or vector types.

See also
  GLSL log2 man page
  GLSL 4.20.8 specification, section 8.2 Exponential Functions

GLM_FUNC_DECL vecType<T, P> glm::pow | ( | vecType< T, P > const & | base,
|  | vecType< T, P > const & | exponent
| ) |  |

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

Parameters

  base | Floating point value. pow function is defined for input values of 'base' defined in the range (inf-, inf+) in the limit of the type precision.
  exponent | Floating point value representing the 'exponent'.

Template Parameters

  genType | Floating-point scalar or vector types.

See also
  GLSL pow man page
  GLSL 4.20.8 specification, section 8.2 Exponential Functions

GLM_FUNC_DECL vecType<T, P> glm::sqrt | ( | vecType< T, P > const & | v | ) |

Returns the positive square root of v.

Parameters

  v | sqrt function is defined for input values of v defined in the range [0, inf+) in the limit of the type precision.

Template Parameters

  genType | Floating-point scalar or vector types.

See also
  GLSL sqrt man page
  GLSL 4.20.8 specification, section 8.2 Exponential Functions