From a8c367416c28edb47c8f8c447b515cca4080adc2 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 5 Oct 2008 19:04:56 +0000 Subject: adds vector2f to the math library --- src/math/vector3f.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/math/vector3f.cc') diff --git a/src/math/vector3f.cc b/src/math/vector3f.cc index 3d816f6..bf2cb8d 100644 --- a/src/math/vector3f.cc +++ b/src/math/vector3f.cc @@ -4,11 +4,10 @@ the terms of the GNU General Public License version 2 */ -// project headers -#include "math/vector3f.h" - -// C++ headers #include +#include + +#include "math/vector3f.h" namespace math { @@ -37,8 +36,11 @@ Vector3f::~Vector3f() void Vector3f::clear() { + /* for (size_t i =0; i < 3; i++) coord[i] = 0; + */ + memset(coord, 0, sizeof(coord)); } void Vector3f::assign(const float vx, const float vy, const float vz) @@ -50,8 +52,11 @@ void Vector3f::assign(const float vx, const float vy, const float vz) void Vector3f::assign(Vector3f const & other) { + /* for (size_t i =0; i < 3; i++) coord[i] = other.coord[i]; + */ + memcpy(coord, other.coord, sizeof(coord)); } Vector3f & Vector3f::operator=(const Vector3f & other) -- cgit v1.2.3