mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-23 13:08:04 +00:00
more volatilty
This commit is contained in:
@@ -236,7 +236,7 @@ public sealed class Gwma : AbstractBase
|
||||
return CalculateWeightedSumWarmup(_buffer.GetSpan(), count, _sigma, fallbackValue);
|
||||
}
|
||||
|
||||
if (_invWeightSum == 0.0)
|
||||
if (Math.Abs(_invWeightSum) <= 0)
|
||||
{
|
||||
return fallbackValue;
|
||||
}
|
||||
@@ -411,7 +411,7 @@ public sealed class Gwma : AbstractBase
|
||||
continue;
|
||||
}
|
||||
|
||||
if (invWeightSum == 0.0)
|
||||
if (Math.Abs(invWeightSum) <= 0)
|
||||
{
|
||||
output[i] = val;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user