0.9.8
norm.hpp
Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependency:
17 #include "../detail/func_geometric.hpp"
18 #include "../gtx/quaternion.hpp"
19 
20 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_GTX_norm extension included")
22 #endif
23 
24 namespace glm
25 {
28 
31  template <typename T, precision P, template <typename, precision> class vecType>
32  GLM_FUNC_DECL T length2(
33  vecType<T, P> const & x);
34 
37  template <typename T, precision P, template <typename, precision> class vecType>
38  GLM_FUNC_DECL T distance2(
39  vecType<T, P> const & p0,
40  vecType<T, P> const & p1);
41 
44  template <typename T, precision P>
45  GLM_FUNC_DECL T l1Norm(
46  tvec3<T, P> const & x,
47  tvec3<T, P> const & y);
48 
51  template <typename T, precision P>
52  GLM_FUNC_DECL T l1Norm(
53  tvec3<T, P> const & v);
54 
57  template <typename T, precision P>
58  GLM_FUNC_DECL T l2Norm(
59  tvec3<T, P> const & x,
60  tvec3<T, P> const & y);
61 
64  template <typename T, precision P>
65  GLM_FUNC_DECL T l2Norm(
66  tvec3<T, P> const & x);
67 
70  template <typename T, precision P>
71  GLM_FUNC_DECL T lxNorm(
72  tvec3<T, P> const & x,
73  tvec3<T, P> const & y,
74  unsigned int Depth);
75 
78  template <typename T, precision P>
79  GLM_FUNC_DECL T lxNorm(
80  tvec3<T, P> const & x,
81  unsigned int Depth);
82 
84 }//namespace glm
85 
86 #include "norm.inl"
GLM_FUNC_DECL T l2Norm(tvec3< T, P > const &x)
Returns the L2 norm of v.
GLM_FUNC_DECL T distance2(vecType< T, P > const &p0, vecType< T, P > const &p1)
Returns the squared distance between p0 and p1, i.e., length2(p0 - p1).
GLM_FUNC_DECL T l1Norm(tvec3< T, P > const &v)
Returns the L1 norm of v.
GLM_FUNC_DECL T lxNorm(tvec3< T, P > const &x, unsigned int Depth)
Returns the L norm of v.
Definition: _noise.hpp:11
GLM_FUNC_DECL T length2(vecType< T, P > const &x)
Returns the squared length of x.