/**
 * Unnormalized mathematical sinc function
 * @see https://en.wikipedia.org/wiki/Sinc_function
 * @param {number} x
 * @return {number}
 */
export function sinc(x) {
    if (x === 0) {
        return 1;
    }

    return Math.sin(x) / x;
}