# Last edited on 2021-07-31 15:28:44 by jstolfi

from math import cos, pi

def hann_bell(x):
  # Hann (raised cosine) bell-like windowing function with support {[-1 _ +1]}
  # and max value 1.
  
  if abs(x) >= 1:
    w = 0.0
  else:
    w = 0.5*(1 + cos(pi*x))
  return w
  # ----------------------------------------------------------------------
