Fix compilation error.

This commit is contained in:
Skyth 2025-01-29 14:52:03 +03:00
parent a858acba61
commit 5e4eac8db3
2 changed files with 7 additions and 1 deletions

View file

@ -131,9 +131,14 @@ float Scale(float size)
return size * g_aspectRatioScale;
}
double ComputeLinearMotion(double duration, double offset, double total)
{
return std::clamp((ImGui::GetTime() - duration - offset / 60.0) / total * 60.0, 0.0, 1.0);
}
double ComputeMotion(double duration, double offset, double total)
{
return sqrt(std::clamp((ImGui::GetTime() - duration - offset / 60.0) / total * 60.0, 0.0, 1.0));
return sqrt(ComputeLinearMotion(duration, offset, total));
}
void DrawPauseContainer(ImVec2 min, ImVec2 max, float alpha)

View file

@ -37,6 +37,7 @@ void ResetProceduralOrigin();
void SetAdditive(bool enabled);
void ResetAdditive();
float Scale(float size);
double ComputeLinearMotion(double duration, double offset, double total);
double ComputeMotion(double duration, double offset, double total);
void DrawPauseContainer(ImVec2 min, ImVec2 max, float alpha = 1);
void DrawPauseHeaderContainer(ImVec2 min, ImVec2 max, float alpha = 1);