-
-
Save bwestergard/7051505 to your computer and use it in GitHub Desktop.
Cassini Do It Yourself (Attempted Fix)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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