Struct solnedgang::Coordinates [−][src]
pub struct Coordinates { /* fields omitted */ }
Expand description
Representation of a location on earth.
Implementations
Create a new Location
instance from a pair of latitude and longitude in decimal representation.
Examples
To create a new instance of this class and print the coordinates to the console:
use solnedgang::Coordinates;
let duesseldorf = Coordinates::new(51.21794, 6.76165);
println!("GPS coordinates for Düsseldorf, Germany are: {}", duesseldorf);
Trait Implementations
Create a new instance of the SunriseSunsetCalculator
class based on the location supplied.
Examples
Create the calculator for Düsseldorf, Germany:
use solnedgang::{SunriseSunsetCalculator, Coordinates};
let duesseldorf = Coordinates::new(51.21794, 6.76165);
let calculator = SunriseSunsetCalculator::from(duesseldorf);