From 84d474fd3bd78f5ba6dcee65323f267fa8061b03 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 27 Apr 2008 16:50:30 +0000 Subject: more 3D changes --- src/math/vector3f.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/math/vector3f.cc') diff --git a/src/math/vector3f.cc b/src/math/vector3f.cc index 51d0385..d5173bb 100644 --- a/src/math/vector3f.cc +++ b/src/math/vector3f.cc @@ -14,9 +14,9 @@ namespace math { Vector3f::Vector3f() : - x(coord[0]), y(coord[1]), z(coord[2]) + x(coord[0]), y(coord[1]), z(coord[2]) { - assign(0,0,0); + clear(); } Vector3f::Vector3f(const Vector3f &other) : @@ -35,6 +35,11 @@ Vector3f::~Vector3f() { } +void Vector3f::clear() +{ + memset(coord, 0, sizeof(coord)); +} + void Vector3f::assign(const float vx, const float vy, const float vz) { coord[0] = vx; -- cgit v1.2.3