projects
/
supertux.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
de3e53cd767fa2535db1a2d687b6c7362905d6c5
[supertux.git]
/
src
/
vector.cpp
1
#include "vector.h"
2
#include <math.h>
3
4
Vector Vector::unit() const
5
{
6
return *this / norm();
7
}
8
9
float Vector::norm() const
10
{
11
return sqrt(x*x + y*y);
12
}