style patterns

This commit is contained in:
Miha Kralj
2026-01-25 16:01:45 -08:00
parent 2836f253c4
commit e59665c8f0
399 changed files with 6892 additions and 1323 deletions
+1 -1
View File
@@ -291,4 +291,4 @@ public class NotchIndicatorTests
$"Value at index {i} should be finite");
}
}
}
}
+3 -3
View File
@@ -74,7 +74,7 @@ public class NotchTests
double output = 0;
// Warmup to stabilize (IIR transient)
for(int i=0; i<100; i++)
for (int i = 0; i < 100; i++)
{
output = notch.Update(new TValue(DateTime.UtcNow, input)).Value;
}
@@ -101,7 +101,7 @@ public class NotchTests
if (i > 50) // ignore transient
{
maxAmp = Math.Max(maxAmp, Math.Abs(outVal));
maxAmp = Math.Max(maxAmp, Math.Abs(outVal));
}
}
@@ -109,4 +109,4 @@ public class NotchTests
// With Q=5, it should be very small.
Assert.True(maxAmp < 0.1, $"Amplitude {maxAmp} should be attenuated ( < 0.1 )");
}
}
}
+2 -2
View File
@@ -40,10 +40,10 @@ public class NotchValidationTests
double[] expected = { 0.5, 0.0, 0.0, 0.0, 0.0, 0.0 };
for(int i=0; i<input.Length; i++)
for (int i = 0; i < input.Length; i++)
{
double val = notch.Update(input[i]).Value;
Assert.Equal(expected[i], val, precision: 9);
}
}
}
}