Skip to content

Commit

Permalink
fix Test_EvenLength_CenterTwoAreSame
Browse files Browse the repository at this point in the history
  • Loading branch information
gsgou committed Aug 18, 2023
1 parent a1f45fe commit 8494fa4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/FftSharp.Tests/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void Test_OddLength_CenterIndexIsBiggest()
[Test]
public void Test_EvenLength_CenterTwoAreSame()
{
foreach (IWindow window in FftSharp.Window.GetWindows())
foreach (IWindow window in FftSharp.Window.GetSymmetricWindows())
{
double[] values = window.Create(12);
Assert.AreEqual(values[5], values[6], 1e-5, window.Name);
Expand Down
7 changes: 7 additions & 0 deletions src/FftSharp/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ public static IWindow[] GetWindows()
.ToArray();
}

public static IWindow[] GetSymmetricWindows()
{
return GetWindows()
.Where(x => !x.Name.Contains("Periodic"))
.ToArray();
}

[Obsolete("This method is obsolete. Create a window in the Windows namespace and interact with its methods.")]
public static double[] Rectangular(int pointCount) => new Windows.Rectangular().Create(pointCount);

Expand Down

0 comments on commit 8494fa4

Please sign in to comment.