Alex Alex - 3 months ago 57
C++ Question

Member function in Eigen math library for vector magnitude

I have been trying to find a method that computes the magnitude of a vector in Eigen and I was not able to. Can somebody provide me with the function name of just if it doesn't exist??

I can create a global method that does the job but I prefer not to.


You want .norm(). Note that there's also .squaredNorm(), .normalized() and .normalize().