- Main Page
- Related Pages
- Modules
- Classes
- Files

Functions

# GLM_GTX_vector_angle: Vector angle

GTX Extensions (Experimental)

Compute angle between vectors. More...

## Functions
template<typename vecType >
GLM_FUNC_QUALIFIER vecType::value_type | angle (vecType const &x, vecType const &y)
template<typename T >
GLM_FUNC_QUALIFIER T | orientedAngle (detail::tvec3< T > const &x, detail::tvec3< T > const &y, detail::tvec3< T > const &ref)
template<typename T >
GLM_FUNC_QUALIFIER T | orientedAngle (detail::tvec2< T > const &x, detail::tvec2< T > const &y)

## Detailed Description

Compute angle between vectors.

<glm/gtx/vector_angle.hpp> need to be included to use these functionalities.

## Function Documentation

GLM_FUNC_QUALIFIER vecType::value_type glm::angle | ( | vecType const & | x,
|  | vecType const & | y
| ) |  |

Returns the absolute angle between two vectors Parameters need to be normalized.

From GLM_GTX_vector_angle extension

GLM_FUNC_QUALIFIER T glm::orientedAngle | ( | detail::tvec3< T > const & | x,
|  | detail::tvec3< T > const & | y,
|  | detail::tvec3< T > const & | ref
| ) |  |

Returns the oriented angle between two 3d vectors based from a reference axis.

Parameters need to be normalized. From GLM_GTX_vector_angle extension.

GLM_FUNC_QUALIFIER T glm::orientedAngle | ( | detail::tvec2< T > const & | x,
|  | detail::tvec2< T > const & | y
| ) |  |

Returns the oriented angle between two 2d vectors Parameters need to be normalized.

From GLM_GTX_vector_angle extension.