0.9.6
norm.hpp
Go to the documentation of this file.
1 
39 #pragma once
40 
41 // Dependency:
42 #include "../glm.hpp"
43 #include "../gtx/quaternion.hpp"
44 
45 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
46 # pragma message("GLM: GLM_GTX_norm extension included")
47 #endif
48 
49 namespace glm
50 {
53 
56  template <typename T>
57  GLM_FUNC_DECL T length2(
58  T const & x);
59 
62  template <typename genType>
63  GLM_FUNC_DECL typename genType::value_type length2(
64  genType const & x);
65 
68  template <typename T>
69  GLM_FUNC_DECL T distance2(
70  T const & p0,
71  T const & p1);
72 
75  template <typename genType>
76  GLM_FUNC_DECL typename genType::value_type distance2(
77  genType const & p0,
78  genType const & p1);
79 
82  template <typename T, precision P>
83  GLM_FUNC_DECL T l1Norm(
84  tvec3<T, P> const & x,
85  tvec3<T, P> const & y);
86 
89  template <typename T, precision P>
90  GLM_FUNC_DECL T l1Norm(
91  tvec3<T, P> const & v);
92 
95  template <typename T, precision P>
96  GLM_FUNC_DECL T l2Norm(
97  tvec3<T, P> const & x,
98  tvec3<T, P> const & y);
99 
102  template <typename T, precision P>
103  GLM_FUNC_DECL T l2Norm(
104  tvec3<T, P> const & x);
105 
108  template <typename T, precision P>
109  GLM_FUNC_DECL T lxNorm(
110  tvec3<T, P> const & x,
111  tvec3<T, P> const & y,
112  unsigned int Depth);
113 
116  template <typename T, precision P>
117  GLM_FUNC_DECL T lxNorm(
118  tvec3<T, P> const & x,
119  unsigned int Depth);
120 
122 }//namespace glm
123 
124 #include "norm.inl"
GLM_FUNC_DECL genType::value_type distance2(genType const &p0, genType const &p1)
Returns the squared distance between p0 and p1, i.e., length(p0 - p1).
GLM_FUNC_DECL genType::value_type length2(genType const &x)
Returns the squared length of x.
GLM_FUNC_DECL T lxNorm(tvec3< T, P > const &x, unsigned int Depth)
Returns the L norm of v.
Definition: _noise.hpp:31
GLM_FUNC_DECL T l1Norm(tvec3< T, P > const &v)
Returns the L1 norm of v.
GLM_FUNC_DECL T l2Norm(tvec3< T, P > const &x)
Returns the L2 norm of v.