Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created October 18, 2013 20:37
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/7047900 to your computer and use it in GitHub Desktop.
Save tmcw/7047900 to your computer and use it in GitHub Desktop.
// Cassini projection
// just a transverse equirectangular projection
// implemented from wikipedia description
d2r = Math.PI / 180;
return Math.asin(Math.sin(x * d2r) * Math.cos(y * d2r));
return Math.atan2(Math.sin(y * d2r),
Math.cos(y * d2r) * Math.cos(x * d2r));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment