/** * Magnitude.cc * * Created on: 31 oct. 2012 * Author: AKKA IS */ #include "magnitude.hh" #include float magnitude(const std::vector& vec) { return sqrtf(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]); } double magnitude(const std::vector& vec) { return sqrt(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]); } long double magnitude(const std::vector& vec) { return sqrtl(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]); } int magnitude(const std::vector& vec) { return sqrt(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]); } short magnitude(const std::vector& vec) { return sqrt(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]); }