diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-30 15:00:12 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-30 15:00:12 +0000 |
| commit | 72fdc42837649c8fd2988e7712749ca6d30c246b (patch) | |
| tree | 3771797df1d09540f20d74f55086885490e6a439 /lib/complex.rb | |
| parent | 8c20f66c485649560ed6082233dbe03cdcdaf7a3 (diff) | |
| download | ruby-72fdc42837649c8fd2988e7712749ca6d30c246b.tar.gz ruby-72fdc42837649c8fd2988e7712749ca6d30c246b.tar.xz ruby-72fdc42837649c8fd2988e7712749ca6d30c246b.zip | |
revert git backfire in r15860; sorry
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/complex.rb')
| -rw-r--r-- | lib/complex.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/complex.rb b/lib/complex.rb index 505b0120e..9d926023a 100644 --- a/lib/complex.rb +++ b/lib/complex.rb @@ -1,35 +1,3 @@ -class Integer - - def gcd(other) - min = self.abs - max = other.abs - while min > 0 - tmp = min - min = max % min - max = tmp - end - max - end - - def lcm(other) - if self.zero? or other.zero? - 0 - else - (self.div(self.gcd(other)) * other).abs - end - end - - def gcdlcm(other) - gcd = self.gcd(other) - if self.zero? or other.zero? - [gcd, 0] - else - [gcd, (self.div(gcd) * other).abs] - end - end - -end - module Math alias exp! exp |
