mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-26 06:18:05 +00:00
fix: update validation logic to prevent negative start index and improve error message for alpha parameter
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user