zeus/include/CUnitVector.hpp

22 lines
336 B
C++
Raw Normal View History

2015-08-31 21:27:09 +00:00
#ifndef CUNITVECTOR_HPP
#define CUNITVECTOR_HPP
#include "CVector3f.hpp"
namespace Zeus
{
2015-08-31 21:27:09 +00:00
class ZE_ALIGN(16) CUnitVector3f : public CVector3f
{
public:
ZE_DECLARE_ALIGNED_ALLOCATOR();
CUnitVector3f(const CVector3f& vec)
: CVector3f(vec)
{
if (canBeNormalized())
normalize();
}
};
}
2015-08-31 21:27:09 +00:00
#endif