mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-23 04:58:08 +00:00
fixes
This commit is contained in:
@@ -156,7 +156,7 @@ public class Htit : AbstractBase
|
||||
_imBuffer.Add(im, Input.IsNew);
|
||||
|
||||
// Calculate period
|
||||
double pd = (im != 0 && re != 0) ? TWO_PI / System.Math.Atan(im / re) : 0;
|
||||
double pd = (im >= double.Epsilon && re >= double.Epsilon) ? TWO_PI / System.Math.Atan(im / re) : 0;
|
||||
pd = ClampPeriod(pd, _lastPd);
|
||||
pd = (ALPHA * pd) + (BETA * _lastPd);
|
||||
_pdBuffer.Add(pd, Input.IsNew);
|
||||
|
||||
Reference in New Issue
Block a user