fix: update validation logic to prevent negative start index and improve error message for alpha parameter

This commit is contained in:
Miha Kralj
2025-12-13 22:16:29 -08:00
parent 487d651cca
commit c1a476ed9c
6 changed files with 19 additions and 172 deletions
+2 -2
View File
@@ -220,8 +220,8 @@ public sealed class Tema : ITValuePublisher
{
if (source.Length != output.Length)
throw new ArgumentException("Source and output must have the same length");
if (alpha <= 0 || alpha > 1)
throw new ArgumentException("Alpha must be between 0 and 1", nameof(alpha));
if (alpha <= 0 || alpha >= 1)
throw new ArgumentException("Alpha must be strictly between 0 and 1", nameof(alpha));
if (source.Length == 0) return;