GCD
In mathematics, the greatest common divisor (gcd) of two or more integers, when at least one of them is not zero, is the largest positive integer that divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4.[1][2]
Installation
Add this line to your application's Gemfile:
gem 'gcd'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gcd
Usage
require "gcd"
Math.gcd(7, 160)
Contributing
- Fork it ( https://github.com/[my-github-username]/gcd/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request