GLM 0.9.5

- Main Page
- Related Pages
- Modules
- Namespaces
- Files

Functions
Exponential functions
GLM Core

## Functions

template<typename genType >
GLM_FUNC_DECL genType | exp (genType const &x)
template<typename genType >
GLM_FUNC_DECL genType | exp2 (genType const &x)
template<typename genType >
GLM_FUNC_DECL genType | inversesqrt (genType const &x)
template<typename genType >
GLM_FUNC_DECL genType | log (genType const &x)
template<typename genType >
GLM_FUNC_DECL genType | log2 (genType const &x)
template<typename genType >
GLM_FUNC_DECL genType | pow (genType const &base, genType const &exponent)
template<typename genType >
GLM_FUNC_DECL genType | sqrt (genType const &x)

## Detailed Description

These all operate component-wise.

The description is per component.

## Function Documentation

GLM_FUNC_DECL genType glm::exp | ( | genType const & | x | ) |

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

Parameters

  x | exp function is defined for input values of x 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 genType glm::exp2 | ( | genType const & | x | ) |

Returns 2 raised to the x power.

Parameters

  x | exp2 function is defined for input values of x 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 genType glm::inversesqrt | ( | genType const & | x | ) |

Returns the reciprocal of the positive square root of x.

Parameters

  x | inversesqrt function is defined for input values of x 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 genType glm::log | ( | genType const & | x | ) |

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

Results are undefined if x <= 0.

Parameters

  x | log function is defined for input values of x 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 genType glm::log2 | ( | genType const & | x | ) |

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

Parameters

  x | log2 function is defined for input values of x 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 genType glm::pow | ( | genType const & | base,
|  | genType const & | exponent
| ) |  |

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

Parameters

  base | Floating point value. pow function is defined for input values of x 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 genType glm::sqrt | ( | genType const & | x | ) |

Returns the positive square root of x.

Parameters

  x | sqrt function is defined for input values of x 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