View Source HaversineEx.Point (haversineEx v0.1.0)
Provides Point struct to be used on HaversineEx. It also provides some helper functions to convert from degrees to radians and viceversa.
Link to this section Summary
Link to this section Types
@type t(lat, lng) :: %HaversineEx.Point{lat: lat, lng: lng}
Link to this section Functions
Converts a point from degrees to radians.
examples
Examples
iex> HaversineEx.Point.deg2rad(%HaversineEx.Point{lat: 40.771209, lng: -73.9673991})
%HaversineEx.Point{lat: 0.7115918, lng: -1.290975}
Converts a point from radians to degrees.
examples
Examples
iex> HaversineEx.Point.rad2deg(%HaversineEx.Point{lat: 0.7115918, lng: -1.290975})
%HaversineEx.Point{lat: 40.771209, lng: -73.9673991}