lib/h3/traversal.rb in h3-3.6.1 vs lib/h3/traversal.rb in h3-3.6.2
- old
+ new
@@ -30,16 +30,10 @@
# 5
#
# @return [Integer] Distance between indexes.
attach_function :distance, :h3Distance, %i[h3_index h3_index], :k_distance
- # @deprecated Please use {#distance} instead.
- def h3_distance(origin, destination)
- distance(origin, destination)
- end
- deprecate :h3_distance, :distance, 2020, 1
-
# @!method line_size(origin, destination)
#
# Derive the number of hexagons present in a line between two H3 indexes.
#
# This value is simply `h3_distance(origin, destination) + 1` when a line is computable.
@@ -55,16 +49,10 @@
# 6
#
# @return [Integer] Number of hexagons found between indexes.
attach_function :line_size, :h3LineSize, %i[h3_index h3_index], :int
- # @deprecated Please use {#line_size} instead.
- def h3_line_size(origin, destination)
- line_size(origin, destination)
- end
- deprecate :h3_line_size, :line_size, 2020, 1
-
# Derives H3 indexes within k distance of the origin H3 index.
#
# Similar to {k_ring}, except that an error is raised when one of the indexes
# returned is a pentagon or is in the pentagon distortion area.
#
@@ -314,15 +302,9 @@
hexagons = H3Indexes.of_size(max_hexagons)
res = Bindings::Private.h3_line(origin, destination, hexagons)
raise(ArgumentError, "Could not compute line") if res.negative?
hexagons.read
end
-
- # @deprecated Please use {#line} instead.
- def h3_line(origin, destination)
- line(origin, destination)
- end
- deprecate :h3_line, :line, 2020, 1
private
def k_rings_for_hex_range(indexes, k)
0.upto(k).map do |j|