mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-07 13:37:44 +00:00
docs: update category index files and fix indicator implementations (#58)
This commit is contained in:
@@ -92,15 +92,8 @@ public sealed class Normalize : AbstractBase
|
||||
var (min, max) = FindMinMax(_buffer.GetSpan());
|
||||
double range = max - min;
|
||||
|
||||
if (range > 0)
|
||||
{
|
||||
result = (value - min) / range;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Flat range: return 0.5 as neutral
|
||||
result = 0.5;
|
||||
}
|
||||
// Flat range: return 0.5 as neutral
|
||||
result = range > 0 ? (value - min) / range : 0.5;
|
||||
|
||||
_state = new State(result, min, max);
|
||||
}
|
||||
@@ -209,4 +202,4 @@ public sealed class Normalize : AbstractBase
|
||||
_p_state = _state;
|
||||
Last = default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user