This commit is contained in:
Miha Kralj
2024-11-04 18:08:33 -08:00
parent 5b333bd2ec
commit fc3e9f756d
21 changed files with 82 additions and 134 deletions
+2 -2
View File
@@ -82,14 +82,14 @@ public class Frama : AbstractBase
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void UpdateMinMax(double price, ref double high, ref double low)
private static void UpdateMinMax(double price, ref double high, ref double low)
{
high = System.Math.Max(high, price);
low = System.Math.Min(low, price);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private double CalculateAlpha(double dimension)
private static double CalculateAlpha(double dimension)
{
double alpha = System.Math.Exp(-4.6 * (dimension - 1));
return System.Math.Clamp(alpha, 0.01, 1.0);