diff options
author | Stijn Buys <ingar@osirion.org> | 2008-07-30 17:16:55 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-07-30 17:16:55 +0000 |
commit | 04050c1685855a0640c7c0d5147299fadbd2ebe8 (patch) | |
tree | b0789947f5cc363950472c5f5a8b55048ca72d18 /src/math/vector3f.cc | |
parent | d09a1be33a647aedc12ce5ddcb7ea4ee23a75c8c (diff) |
select-on-release
Diffstat (limited to 'src/math/vector3f.cc')
-rw-r--r-- | src/math/vector3f.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/math/vector3f.cc b/src/math/vector3f.cc index 57ad52a..3d816f6 100644 --- a/src/math/vector3f.cc +++ b/src/math/vector3f.cc @@ -37,7 +37,8 @@ Vector3f::~Vector3f() void Vector3f::clear() { - memset(coord, 0, sizeof(coord)); + for (size_t i =0; i < 3; i++) + coord[i] = 0; } void Vector3f::assign(const float vx, const float vy, const float vz) @@ -49,9 +50,8 @@ void Vector3f::assign(const float vx, const float vy, const float vz) void Vector3f::assign(Vector3f const & other) { - coord[0] = other.coord[0]; - coord[1] = other.coord[1]; - coord[2] = other.coord[2]; + for (size_t i =0; i < 3; i++) + coord[i] = other.coord[i]; } Vector3f & Vector3f::operator=(const Vector3f & other) |