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

+37
View File
@@ -0,0 +1,37 @@
using System;
namespace VibranceHud;
public static class DriverVibranceIntent
{
public static int? For(bool userChoseAVibrance, int vibrance, int baseline, bool effectSuspended)
{
if (!userChoseAVibrance)
{
return null;
}
if (effectSuspended)
{
if (!IsARealBaseline(baseline))
{
return null;
}
return baseline;
}
return Clamp(vibrance);
}
private static bool IsARealBaseline(int baseline)
{
if (baseline >= 0)
{
return baseline <= 100;
}
return false;
}
private static int Clamp(int level)
{
return Math.Clamp(level, 0, 100);
}
}