Sha256: d3c1e07776fa188d1bfbe36342e7b1b243a08edc2854c911f4dfc850f608392e

Contents?: true

Size: 259 Bytes

Versions: 7

Compression:

Stored size: 259 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.
  #
  #   4.distance(3)  #=> 1

  def distance(other)
    self - other
  end

end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
facets-2.4.0 lib/facets/numeric/distance.rb
facets-2.4.1 lib/facets/numeric/distance.rb
facets-2.4.2 lib/core/facets/numeric/distance.rb
facets-2.4.4 lib/core/facets/numeric/distance.rb
facets-2.4.3 lib/core/facets/numeric/distance.rb
facets-2.4.5 lib/core/facets/numeric/distance.rb
mack-facets-0.8.2 lib/gems/facets-2.4.5/lib/core/facets/numeric/distance.rb