magnitude.hh 434 Bytes
/**
 * Magnitude.hh
 *
 *  Created on: 31 oct. 2012
 *      Author: AKKA IS
 */

#ifndef MAGNITUDE_HH_
#define MAGNITUDE_HH_

#include <vector>

/**
 * @bried Compute the magnitude of el
 * @return  sqrtf(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]);
 */
float magnitude(const std::vector<float>& el);

double magnitude(const std::vector<double>& vec);

int magnitude(const std::vector<int>& vec);

#endif /* MAGNITUDE_HH_ */