2017-11-13 22:16:38 +00:00
|
|
|
#include "math/Vector3f.h"
|
|
|
|
|
|
|
|
Vector3f& Vector3f::round()
|
|
|
|
{
|
2017-11-17 14:58:52 +00:00
|
|
|
mX = (float)(int)(mX + 0.5f);
|
|
|
|
mY = (float)(int)(mY + 0.5f);
|
|
|
|
mZ = (float)(int)(mZ + 0.5f);
|
2017-11-22 21:29:52 +00:00
|
|
|
|
2017-11-13 22:16:38 +00:00
|
|
|
return *this;
|
|
|
|
|
|
|
|
} // round
|
|
|
|
|
|
|
|
Vector3f& Vector3f::lerp(const Vector3f& _start, const Vector3f& _end, const float _fraction)
|
|
|
|
{
|
|
|
|
mX = Math::lerp(_start.x(), _end.x(), _fraction);
|
|
|
|
mY = Math::lerp(_start.y(), _end.y(), _fraction);
|
|
|
|
mZ = Math::lerp(_start.z(), _end.z(), _fraction);
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
|
|
|
|
} // lerp
|