upload
This commit is contained in:
commit
1c7a8cf25f
579 files changed
+83196
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user