Skip to content

Instantly share code, notes, and snippets.

@apaleslimghost
Last active August 16, 2017 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apaleslimghost/92b67fdfce1afbc4c3ca270416febbc6 to your computer and use it in GitHub Desktop.
Save apaleslimghost/92b67fdfce1afbc4c3ca270416febbc6 to your computer and use it in GitHub Desktop.
module.exports = ([x, y], size) => {
const t = 2 * Math.PI * Math.random();
const h = size * Math.random();
return [
x + h * Math.cos(t),
y + h * Math.sin(t),
];
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment