mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-16 17:48:05 +00:00
[CodeFactor] Apply fixes to commit 4a01f03
This commit is contained in:
@@ -331,7 +331,7 @@ public class DwtValidationTests
|
||||
// Build state well past warmup (WarmupPeriod = 2^4 = 16)
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
ind.Update(new TValue(t0.AddSeconds(i), 100.0 + i * 0.5));
|
||||
ind.Update(new TValue(t0.AddSeconds(i), 100.0 + (i * 0.5)));
|
||||
}
|
||||
|
||||
// Anchor bar
|
||||
|
||||
@@ -440,9 +440,9 @@ public sealed class Dwt : AbstractBase
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
static double Get(Span<double> b, int h, int c, int lag)
|
||||
{
|
||||
int idx = ((h - 1 - lag) % c + c) % c;
|
||||
int idx = (((h - 1 - lag) % c) + c) % c;
|
||||
int maxLag = c - 1;
|
||||
if (lag > maxLag) { idx = ((h - 1 - maxLag) % c + c) % c; }
|
||||
if (lag > maxLag) { idx = (((h - 1 - maxLag) % c) + c) % c; }
|
||||
return b[idx];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user