sonar fixes

This commit is contained in:
Miha Kralj
2024-11-05 15:51:29 -08:00
parent 2b5c89640d
commit 0bae9ce15b
19 changed files with 801 additions and 141 deletions
+3 -8
View File
@@ -43,14 +43,9 @@ public sealed class Huber : AbstractBase
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Huber(int period, double delta = 1.0)
{
if (period < 1)
{
throw new ArgumentOutOfRangeException(nameof(period), "Period must be greater than or equal to 1.");
}
if (delta <= 0)
{
throw new ArgumentOutOfRangeException(nameof(delta), "Delta must be greater than 0.");
}
ArgumentOutOfRangeException.ThrowIfLessThan(period, 1);
ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(delta, 0);
WarmupPeriod = period;
_actualBuffer = new CircularBuffer(period);
_predictedBuffer = new CircularBuffer(period);