Functions

GLM_GTX_vector_angle: Vector angle

GTX Extensions (Experimental)

Compute angle between vectors. More...

Functions

template<typename vecType >
vecType::value_type angle (vecType const &x, vecType const &y)
template<typename vecType >
vecType::value_type orientedAngle (vecType const &x, vecType const &y)
template<typename vecType >
vecType::value_type orientedAngleFromRef (vecType const &x, vecType const &y, detail::tvec3< typename vecType::value_type > const &ref)

Detailed Description

Compute angle between vectors.

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


Function Documentation

vecType::value_type glm::gtx::vector_angle::angle ( vecType const &  x,
vecType const &  y 
)

Returns the absolute angle between x and y.

Parameters need to be normalized. From GLM_GTX_vector_angle extension

vecType::value_type glm::gtx::vector_angle::orientedAngle ( vecType const &  x,
vecType const &  y 
)

Returns the oriented angle between x and y Parameters need to be normalized.

From GLM_GTX_vector_angle extension.

vecType::value_type glm::gtx::vector_angle::orientedAngleFromRef ( vecType const &  x,
vecType const &  y,
detail::tvec3< typename vecType::value_type > const &  ref 
)

Returns the orientation of a two vector base from a normal.

Parameters need to be normalized. From GLM_GTX_vector_angle extension.