* Fix previous commit

This commit is contained in:
2015-08-31 14:27:09 -07:00
parent 716ca479ce
commit 394a225062
5 changed files with 61 additions and 1 deletions

19
include/CUnitVector.hpp Normal file
View File

@@ -0,0 +1,19 @@
#ifndef CUNITVECTOR_HPP
#define CUNITVECTOR_HPP
#include "CVector3f.hpp"
class ZE_ALIGN(16) CUnitVector3f : public CVector3f
{
public:
ZE_DECLARE_ALIGNED_ALLOCATOR();
CUnitVector3f(const CVector3f& vec)
: CVector3f(vec)
{
if (canBeNormalized())
normalize();
}
};
#endif

View File

@@ -215,7 +215,7 @@ class ZE_ALIGN(16) CVector2f
mag = 1.0 / mag;
return *this * mag;
}
return {1, 0};
return {0, 0};
}
inline float cross(const CVector2f& rhs) const

View File

@@ -14,6 +14,7 @@
#include "CUnitVector.hpp"
#include "CRectangle.hpp"
#include "CPlane.hpp"
#include "CLine.hpp"
#include "CAABox.hpp"
#include "COBBox.hpp"
#include "CSphere.hpp"