mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-04 19:04:08 +00:00
Tiny vector cleanup
This commit is contained in:
parent
ce7239056b
commit
361915947b
2 changed files with 4 additions and 5 deletions
|
@ -396,7 +396,7 @@ Vector VectorPath::getValue(float usePercent)
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
float InterpolatedVector::interpolateTo(Vector vec, float timePeriod, int loopType, bool pingPong, bool ease, InterpolateToFlag flag)
|
float InterpolatedVector::interpolateTo(Vector vec, float timePeriod, int loopType, bool pingPong, bool ease)
|
||||||
{
|
{
|
||||||
if (timePeriod == 0)
|
if (timePeriod == 0)
|
||||||
{
|
{
|
||||||
|
@ -550,14 +550,14 @@ void InterpolatedVector::doInterpolate(float dt)
|
||||||
|
|
||||||
if (data->pingPong)
|
if (data->pingPong)
|
||||||
{
|
{
|
||||||
interpolateTo (data->from, data->timePeriod, data->loopType, data->pingPong, data->ease, IS_LOOPING);
|
interpolateTo (data->from, data->timePeriod, data->loopType, data->pingPong, data->ease);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->x = data->from.x;
|
this->x = data->from.x;
|
||||||
this->y = data->from.y;
|
this->y = data->from.y;
|
||||||
this->z = data->from.z;
|
this->z = data->from.z;
|
||||||
interpolateTo (data->target, data->timePeriod, data->loopType, data->pingPong, data->ease, IS_LOOPING);
|
interpolateTo (data->target, data->timePeriod, data->loopType, data->pingPong, data->ease);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -515,8 +515,7 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum InterpolateToFlag { NONE=0, IS_LOOPING };
|
float interpolateTo (Vector vec, float timePeriod, int loopType = 0, bool pingPong = false, bool ease = false);
|
||||||
float interpolateTo (Vector vec, float timePeriod, int loopType = 0, bool pingPong = false, bool ease = false, InterpolateToFlag flag = NONE);
|
|
||||||
void inline update(float dt)
|
void inline update(float dt)
|
||||||
{
|
{
|
||||||
if (!data)
|
if (!data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue