Skip to content

Instantly share code, notes, and snippets.

@wwwtyro
Created July 23, 2020 01:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wwwtyro/450f6c6917e1e17041260b6187f22997 to your computer and use it in GitHub Desktop.
Save wwwtyro/450f6c6917e1e17041260b6187f22997 to your computer and use it in GitHub Desktop.
function primenoise(t: number) {
const primes = [2, 3, 5, 7, 11, 13, 17, 19];
let sum = 0;
for (const p of primes) {
sum += Math.sin(t / p);
}
return sum / primes.length;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment