Sha256: 15c57d72bb7f9d9bf1c1f94a850bc5198a53a9b0a4461f66717a21cf4479b045

Contents?: true

Size: 304 Bytes

Versions: 4

Compression:

Stored size: 304 Bytes

Contents

class Numeric
  # Returns the distance between self an another value.
  # This is the same as #- but it provides an alternative
  # for common naming between variant classes.
  #
  #   require 'facet/numeric/distance'
  #
  #   4.distance(3)  #=> 1
  #
  def distance( other )
    self - other
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-0.6.3 lib/facet/numeric/distance.rb
facets-0.7.0 lib/facet/numeric/distance.rb
facets-0.7.1 lib/facet/numeric/distance.rb
facets-0.7.2 lib/facet/numeric/distance.rb