I'm new to using the GLM library, but it appears it does not have a magnitude function. Is this correct? If so, what is the reasoning?
GLM is written as a platform independent library with no dependence and officially supports the following compilers: GCC 3.4 and higher. LLVM 2.3 and higher. Visual Studio 2005 and higher.
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.
glm::length()
:
genType::value_type glm::length( genType const & x )
Returns the length of x, i.e., sqrt(x * x).
And as @bcrist pointed out, glm::length2
from GLM_GTX_norm
:
T glm::length2( vecType< T, P > const& x )
Returns the squared length of x.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With