feat(validation): add input validation for Bilateral and Blma constructors; enhance Butter and Mgdi calculations with NaN handling

This commit is contained in:
Miha Kralj
2025-12-25 20:53:56 -08:00
parent ac8b2dbb3f
commit 0d077c24d8
15 changed files with 195 additions and 66 deletions
+11
View File
@@ -551,6 +551,17 @@ public class EmaTests
Assert.Equal(verifyEma.Last.Value, ema.Last.Value, 1e-10);
}
[Fact]
public void Prime_AllNaNs_ReturnsNaN()
{
var ema = new Ema(5);
double[] history = [double.NaN, double.NaN, double.NaN];
ema.Prime(history);
Assert.True(double.IsNaN(ema.Last.Value));
}
[Fact]
public void Calculate_ReturnsCorrectResultsAndHotIndicator()
{