https://github.com/milesgranger/antipode
Calculate the point on earth's service diametrically opposite to it.
https://github.com/milesgranger/antipode
Last synced: 12 months ago
JSON representation
Calculate the point on earth's service diametrically opposite to it.
- Host: GitHub
- URL: https://github.com/milesgranger/antipode
- Owner: milesgranger
- License: mit
- Created: 2020-06-20T17:14:25.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-20T18:04:58.000Z (almost 6 years ago)
- Last Synced: 2025-05-18T22:31:48.397Z (about 1 year ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# antipode
[](https://github.com/milesgranger/antipode/actions?query=branch=master)
[](https://crates.io/crates/antipode)
Calculate the point on earth's surface diametrically opposite to it.
...maybe simplest crate ever? ;-)
Example
-------
```rust
use antipode::antipode;
let coord = (60.394306, 5.325919); // Bergen, Norway
let expected = (-60.394306, -174.674081); // Somewhere off the coast of New Zealand
assert_eq!(expected, antipode(coord));
```