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
+9
View File
@@ -46,9 +46,13 @@ public sealed class Exptrans : AbstractBase
public override TValue Update(TValue input, bool isNew = true)
{
if (isNew)
{
_p_state = _state;
}
else
{
_state = _p_state;
}
double value = input.Value;
double result;
@@ -114,9 +118,14 @@ public sealed class Exptrans : AbstractBase
public static void Calculate(ReadOnlySpan<double> source, Span<double> output)
{
if (source.Length == 0)
{
throw new ArgumentException("Source cannot be empty", nameof(source));
}
if (output.Length < source.Length)
{
throw new ArgumentException("Output length must be >= source length", nameof(output));
}
double lastValid = 1.0; // exp(0) = 1