mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-25 13:58:04 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -2,7 +2,6 @@ namespace QuanTAlib;
|
||||
|
||||
public class AgcTests
|
||||
{
|
||||
|
||||
// Helper: generate a sine wave that oscillates around zero
|
||||
private static TSeries MakeSineWave(int count, double amplitude = 1.0, double period = 20.0)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ public class AgcValidationTests
|
||||
double[] input = new double[T];
|
||||
for (int i = 0; i < T; i++)
|
||||
{
|
||||
double amplitude = 1.0 + i * 0.01; // grows from 1 to 11
|
||||
double amplitude = 1.0 + (i * 0.01); // grows from 1 to 11
|
||||
input[i] = amplitude * Math.Sin(2.0 * Math.PI * i / 20.0);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class AgcValidationTests
|
||||
double[] input = new double[500];
|
||||
for (int i = 0; i < input.Length; i++)
|
||||
{
|
||||
input[i] = Math.Sin(2.0 * Math.PI * i / 25.0) * (1.0 + 0.3 * Math.Sin(2.0 * Math.PI * i / 100.0));
|
||||
input[i] = Math.Sin(2.0 * Math.PI * i / 25.0) * (1.0 + (0.3 * Math.Sin(2.0 * Math.PI * i / 100.0)));
|
||||
}
|
||||
|
||||
double[] out1 = new double[input.Length];
|
||||
|
||||
Reference in New Issue
Block a user