Sha256: 66532ee71bb807a36e139463e9e11cd636542aceb12f13148f7f5b49771b2297

Contents?: true

Size: 118 Bytes

Versions: 6

Compression:

Stored size: 118 Bytes

Contents

module Numerals

  def self.gcd(a,b)
    while b!=0 do
      a,b = b, a.modulo(b)
    end
    return a.abs
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
numerals-0.3.1 lib/numerals/support.rb
numerals-0.3.0 lib/numerals/support.rb
numerals-0.2.1 lib/numerals/support.rb
numerals-0.2.0 lib/numerals/support.rb
numerals-0.1.0 lib/numerals/support.rb
numerals-0.0.0 lib/numerals/support.rb