diff options
Diffstat (limited to 'src/math/vector3f.h')
-rw-r--r-- | src/math/vector3f.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/math/vector3f.h b/src/math/vector3f.h index 8bc62ff..cc318b0 100644 --- a/src/math/vector3f.h +++ b/src/math/vector3f.h @@ -1,7 +1,7 @@ /* math/vector3f.cc - This file is part of the Osirion project and is distributed under - the terms of the GNU General Public License version 2 + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 */ #ifndef __INCLUDED_MATH_VECTOR3F_H__ @@ -13,13 +13,15 @@ // C++ headers #include <iostream> -namespace math { +namespace math +{ /// a point or vector in 3D-space /** An instance of this class represents a point in 3D-space or a 3D-vector * and forms the basic building block for all spatial calculations. */ -class Vector3f { +class Vector3f +{ public: /// Default constructor, creates a Vector3f (0,0,0) @@ -96,14 +98,14 @@ public: inline float operator[](const unsigned int index) const { return coord[index]; } - + float &x; float &y; float &z; - + /// Return the cartesian length of this vector float length() const; - + /// Return the cartesian length squared (to speed up calculations) float lengthsquared() const; |