0.9.6
vector_angle.hpp
Go to the documentation of this file.
1 
40 #pragma once
41 
42 // Dependency:
43 #include "../glm.hpp"
44 #include "../gtc/epsilon.hpp"
45 #include "../gtx/quaternion.hpp"
46 #include "../gtx/rotate_vector.hpp"
47 
48 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
49 # pragma message("GLM: GLM_GTX_vector_angle extension included")
50 #endif
51 
52 namespace glm
53 {
56 
60  template <typename vecType>
61  GLM_FUNC_DECL typename vecType::value_type angle(
62  vecType const & x,
63  vecType const & y);
64 
68  template <typename T, precision P>
69  GLM_FUNC_DECL T orientedAngle(
70  tvec2<T, P> const & x,
71  tvec2<T, P> const & y);
72 
76  template <typename T, precision P>
77  GLM_FUNC_DECL T orientedAngle(
78  tvec3<T, P> const & x,
79  tvec3<T, P> const & y,
80  tvec3<T, P> const & ref);
81 
83 }// namespace glm
84 
85 #include "vector_angle.inl"
GLM_FUNC_DECL vecType::value_type angle(vecType const &x, vecType const &y)
Returns the absolute angle between two vectors Parameters need to be normalized.
Definition: _noise.hpp:31
GLM_FUNC_DECL T orientedAngle(tvec3< T, P > const &x, tvec3< T, P > const &y, tvec3< T, P > const &ref)
Returns the oriented angle between two 3d vectors based from a reference axis.