added inheritance diagram for the gameobjects
[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 }