0.9.9 API documenation
Functions

Functions

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T distance2 (vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l1Norm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l1Norm (vec< 3, T, Q > const &v)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l2Norm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T l2Norm (vec< 3, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL T length2 (vec< L, T, Q > const &x)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T lxNorm (vec< 3, T, Q > const &x, vec< 3, T, Q > const &y, unsigned int Depth)
 
template<typename T , qualifier Q>
GLM_FUNC_DECL T lxNorm (vec< 3, T, Q > const &x, unsigned int Depth)
 

Detailed Description

Include <glm/gtx/norm.hpp> to use the features of this extension.

Various ways to compute vector norms.

Function Documentation

◆ distance2()

GLM_FUNC_DECL T glm::distance2 ( vec< L, T, Q > const &  p0,
vec< L, T, Q > const &  p1 
)

Returns the squared distance between p0 and p1, i.e., length2(p0 - p1).

From GLM_GTX_norm extension.

◆ l1Norm() [1/2]

GLM_FUNC_DECL T glm::l1Norm ( vec< 3, T, Q > const &  x,
vec< 3, T, Q > const &  y 
)

Returns the L1 norm between x and y.

From GLM_GTX_norm extension.

◆ l1Norm() [2/2]

GLM_FUNC_DECL T glm::l1Norm ( vec< 3, T, Q > const &  v)

Returns the L1 norm of v.

From GLM_GTX_norm extension.

◆ l2Norm() [1/2]

GLM_FUNC_DECL T glm::l2Norm ( vec< 3, T, Q > const &  x,
vec< 3, T, Q > const &  y 
)

Returns the L2 norm between x and y.

From GLM_GTX_norm extension.

◆ l2Norm() [2/2]

GLM_FUNC_DECL T glm::l2Norm ( vec< 3, T, Q > const &  x)

Returns the L2 norm of v.

From GLM_GTX_norm extension.

◆ length2()

GLM_FUNC_DECL T glm::length2 ( vec< L, T, Q > const &  x)

Returns the squared length of x.

From GLM_GTX_norm extension.

◆ lxNorm() [1/2]

GLM_FUNC_DECL T glm::lxNorm ( vec< 3, T, Q > const &  x,
vec< 3, T, Q > const &  y,
unsigned int  Depth 
)

Returns the L norm between x and y.

From GLM_GTX_norm extension.

◆ lxNorm() [2/2]

GLM_FUNC_DECL T glm::lxNorm ( vec< 3, T, Q > const &  x,
unsigned int  Depth 
)

Returns the L norm of v.

From GLM_GTX_norm extension.