diff options
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) |