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 | ef260b085eea729efaa46e93ac71d08a3fa210c6 (patch) | |
tree | 3771797df1d09540f20d74f55086885490e6a439 /lib/complex.rb | |
parent | 3730710d79aa0bde6ab5b36e18c734dd9718aac0 (diff) |
revert git backfire in r15860; sorry
git-svn-id: svn+ssh://ci.ruby-lang.org/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 505b0120e3..9d926023a7 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 |