GLM  0.9.5
vector_angle.hpp
Go to the documentation of this file.
1 
40 #ifndef GLM_GTX_vector_angle
41 #define GLM_GTX_vector_angle
42 
43 // Dependency:
44 #include "../glm.hpp"
45 #include "../gtc/epsilon.hpp"
46 #include "../gtx/quaternion.hpp"
47 #include "../gtx/rotate_vector.hpp"
48 
49 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
50 # pragma message("GLM: GLM_GTX_vector_angle extension included")
51 #endif
52 
53 namespace glm
54 {
57 
61  template <typename vecType>
62  GLM_FUNC_QUALIFIER typename vecType::value_type angle(
63  vecType const & x,
64  vecType const & y);
65 
69  template <typename T, precision P>
70  GLM_FUNC_QUALIFIER T orientedAngle(
71  detail::tvec2<T, P> const & x,
72  detail::tvec2<T, P> const & y);
73 
77  template <typename T, precision P>
78  GLM_FUNC_QUALIFIER T orientedAngle(
79  detail::tvec3<T, P> const & x,
80  detail::tvec3<T, P> const & y,
81  detail::tvec3<T, P> const & ref);
82 
84 }// namespace glm
85 
86 #include "vector_angle.inl"
87 
88 #endif//GLM_GTX_vector_angle
GLM_FUNC_QUALIFIER T orientedAngle(detail::tvec2< T, P > const &x, detail::tvec2< T, P > const &y)
Returns the oriented angle between two 2d vectors Parameters need to be normalized.
GLM_FUNC_DECL T angle(detail::tquat< T, P > const &x)
Returns the quaternion rotation angle.