aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cmath.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-18 21:19:18 +0000
commit7bbf2f308580f468802cd7d32c94fce1b9f1779e (patch)
tree0a680f59e70a78d60e776d7b763e618fb2fec624 /lib/cmath.rb
parent34276148c4450faa77bb298cfbe005f7c263f802 (diff)
downloadruby-7bbf2f308580f468802cd7d32c94fce1b9f1779e.tar.gz
* lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style Patch by Steve Klabnik [Ruby 1.9 - Bug #4730] Patch by Jason Dew [Ruby 1.9 - Feature #4718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cmath.rb')
-rw-r--r--lib/cmath.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/cmath.rb b/lib/cmath.rb
index 2814e8cbae..24a0e70f9c 100644
--- a/lib/cmath.rb
+++ b/lib/cmath.rb
@@ -55,7 +55,7 @@ module CMath
else
ere = exp!(z.real)
Complex(ere * cos!(z.imag),
- ere * sin!(z.imag))
+ ere * sin!(z.imag))
end
end
@@ -71,7 +71,7 @@ module CMath
else
a = Complex(log!(z.abs), z.arg)
if b
- a /= log(b)
+ a /= log(b)
end
a
end
@@ -105,18 +105,18 @@ module CMath
def sqrt(z)
if z.real?
if z < 0
- Complex(0, sqrt!(-z))
+ Complex(0, sqrt!(-z))
else
- sqrt!(z)
+ sqrt!(z)
end
else
if z.imag < 0 ||
- (z.imag == 0 && z.imag.to_s[0] == '-')
- sqrt(z.conjugate).conjugate
+ (z.imag == 0 && z.imag.to_s[0] == '-')
+ sqrt(z.conjugate).conjugate
else
- r = z.abs
- x = z.real
- Complex(sqrt!((r + x) / 2.0), sqrt!((r - x) / 2.0))
+ r = z.abs
+ x = z.real
+ Complex(sqrt!((r + x) / 2.0), sqrt!((r - x) / 2.0))
end
end
end
@@ -138,7 +138,7 @@ module CMath
sin!(z)
else
Complex(sin!(z.real) * cosh!(z.imag),
- cos!(z.real) * sinh!(z.imag))
+ cos!(z.real) * sinh!(z.imag))
end
end
@@ -149,7 +149,7 @@ module CMath
cos!(z)
else
Complex(cos!(z.real) * cosh!(z.imag),
- -sin!(z.real) * sinh!(z.imag))
+ -sin!(z.real) * sinh!(z.imag))
end
end
@@ -170,7 +170,7 @@ module CMath
sinh!(z)
else
Complex(sinh!(z.real) * cos!(z.imag),
- cosh!(z.real) * sin!(z.imag))
+ cosh!(z.real) * sin!(z.imag))
end
end
@@ -181,7 +181,7 @@ module CMath
cosh!(z)
else
Complex(cosh!(z.real) * cos!(z.imag),
- sinh!(z.real) * sin!(z.imag))
+ sinh!(z.real) * sin!(z.imag))
end
end