Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created March 5, 2013 03:48
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 tmcw/5087852 to your computer and use it in GitHub Desktop.
Save tmcw/5087852 to your computer and use it in GitHub Desktop.
// a point on a unit circle
pt = [
Math.cos(0.6),
Math.sin(0.6)];
// the distance from a point
// on the unit circle to the center
// is always 1
Math.sqrt(Math.pow(pt[0], 2) +
Math.pow(pt[1], 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment