Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/vector3f.cc')
-rw-r--r--src/math/vector3f.cc13
1 files changed, 9 insertions, 4 deletions
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 <cmath>
+#include <cstring>
+
+#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)