lib/geo_calc/calc/bearing.rb in geo_calc-0.7.3 vs lib/geo_calc/calc/bearing.rb in geo_calc-0.7.4
- old
+ new
@@ -1,18 +1,19 @@
module GeoCalc
module Bearing
+ # @returns [Numeric] bearing in degrees
def bearing_to point
- GeoCalc::Calc::Bearing.bearing_to self, point
+ GeoCalc::Bearing.bearing_to self, point
end
# Returns the (initial) bearing from this point to the supplied point, in degrees
- # see http:#williams.best.vwh.net/avform.htm#Crs
+ # see(http:#williams.best.vwh.net/avform.htm#Crs)
#
- # - Point point: Latitude/longitude of destination point
+ # @param [GeoPoint] Latitude/longitude of destination point
#
- # Returns - Numeric: Initial bearing in degrees from North
-
+ # @return [Numeric] initial bearing in degrees from North
+ #
def self.bearing_to base_point, point
lat1 = base_point.lat.to_rad
lat2 = point.lat.to_rad
dlon = (point.lon - base_point.lon).to_rad
@@ -22,19 +23,19 @@
(bearing.to_deg + 360) % 360
end
def final_bearing_to point
- GeoCalc::Calc::Bearing.final_bearing_to self, point
+ GeoCalc::Bearing.final_bearing_to self, point
end
# Returns final bearing arriving at supplied destination point from this point; the final bearing
# will differ from the initial bearing by varying degrees according to distance and latitude
#
- # - GeoPoint point: Latitude/longitude of destination point
+ # @param [GeoPoint] Latitude/longitude of destination point
#
- # Returns Numeric: Final bearing in degrees from North
-
+ # @return [Numeric] final bearing in degrees from North
+ #
def self.final_bearing_to base_point, point
# get initial bearing from supplied point back to this point...
lat1 = point.lat.to_rad
lat2 = base_point.lat.to_rad
dlon = (base_point.lon - point.lon).to_rad