Files
DP44/DataPRO/FftSharp/Windows/Cosine.cs

18 lines
565 B
C#
Raw Normal View History

2026-04-17 14:55:32 -04:00
using System;
namespace FftSharp.Windows
{
public class Cosine : Window, IWindow
{
public override string Name => "Cosine";
public override string Description =>
"This window is simply a cosine function. It reaches zero on both sides and is similar to " +
"Blackman, Hamming, Hanning, and flat top windows, but probably should not be used in practice.";
protected override double windowValue(int index, int size)
{
return Math.Sin(index * Math.PI / (size - 1));
}
}
}