Skip to content

Instantly share code, notes, and snippets.

@bwestergard
Last active December 25, 2015 22:39
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 bwestergard/7051505 to your computer and use it in GitHub Desktop.
Save bwestergard/7051505 to your computer and use it in GitHub Desktop.
Cassini Do It Yourself (Attempted Fix)
// 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