mirror of
https://github.com/AxioDL/zeus.git
synced 2025-12-14 23:56:10 +00:00
* Fix previous commit
This commit is contained in:
19
include/CUnitVector.hpp
Normal file
19
include/CUnitVector.hpp
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user