mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
24 lines
511 B
C++
24 lines
511 B
C++
![]() |
#include "math/Vector4f.h"
|
||
|
|
||
|
Vector4f& Vector4f::round()
|
||
|
{
|
||
|
mX = (int)(mX + 0.5f);
|
||
|
mY = (int)(mY + 0.5f);
|
||
|
mZ = (int)(mZ + 0.5f);
|
||
|
mW = (int)(mW + 0.5f);
|
||
|
|
||
|
return *this;
|
||
|
|
||
|
} // round
|
||
|
|
||
|
Vector4f& Vector4f::lerp(const Vector4f& _start, const Vector4f& _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);
|
||
|
mW = Math::lerp(_start.w(), _end.w(), _fraction);
|
||
|
|
||
|
return *this;
|
||
|
|
||
|
} // lerp
|