This commit is contained in:
TinyHerm committed 2026-11-24 23:40:08 +03:00
commit 1c7a8cf25f
579 files changed
+83196

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
using System;
namespace VibranceHud.DarkBoost;
public static class DarkBoostFade
{
public static readonly TimeSpan Duration = TimeSpan.FromMilliseconds(250.0);
public static double Amount(double from, double to, TimeSpan elapsed, bool fade)
{
if (!fade || elapsed >= Duration)
{
return to;
}
if (elapsed <= TimeSpan.Zero)
{
return from;
}
double num = elapsed.TotalMilliseconds / Duration.TotalMilliseconds;
return from + (to - from) * num;
}
}