#include "hann.hpp"
#include <numbers>

namespace hr::math
{
  void hann::creaate(size_t size)
  {
    m_size = size;
    m_win.resize(m_size, 0.0);
    for (size_t i = 0; i < m_size; ++i) 
      m_win[i] = 0.5 * (1.0 - std::cosf((2.0 * std::numbers::pi * i) / m_size));
  }
}
