Blame view

src/ExternLib/Magnitude/magnitude.cc 244 Bytes
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Magnitude.cc
 *
 *  Created on: 31 oct. 2012
 *      Author: AKKA IS
 */

#include "magnitude.hh"

#include <math.h>

float magnitude(const std::vector<float>& vec)
{
	return sqrtf(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]);
}