UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

13 lines (12 loc) 255 B
/** * 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; }