diff options
| author | H_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-06 11:14:04 +0000 |
|---|---|---|
| committer | H_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-06 11:14:04 +0000 |
| commit | 7f5df13d14a4087afdd66d7fb9e1a3e589fe5c9d (patch) | |
| tree | e6f22d10090e9d39e95a2e1520d762241ecbd00f | |
| parent | 1a1bf20ac9578632ab875ccce847b3ecb911d83a (diff) | |
| download | ruby-7f5df13d14a4087afdd66d7fb9e1a3e589fe5c9d.tar.gz ruby-7f5df13d14a4087afdd66d7fb9e1a3e589fe5c9d.tar.xz ruby-7f5df13d14a4087afdd66d7fb9e1a3e589fe5c9d.zip | |
* sample/biorhythm.rb (getPosiiton,etc)
fix at changing Date module ( Date is changed Fixnum to Rational )
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | sample/biorhythm.rb | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Jun 6 19:50:39 2002 KONISHI Hiromasa <H_Konishi@ruby-lang.org> + + * sample/biorhythm.rb (getPosiiton,etc) + fix at changing Date module ( Date is changed Fixnum to Rational ) + Thu Jun 6 12:04:30 2002 NAKAMURA Usaku <usa@ruby-lang.org> * win32/Makefile.sub (config.status): use sub! instead of []= because diff --git a/sample/biorhythm.rb b/sample/biorhythm.rb index a139eed6c..8fc08c691 100644 --- a/sample/biorhythm.rb +++ b/sample/biorhythm.rb @@ -51,6 +51,7 @@ end def getPosition(z) pi = Math::PI + z = Integer(z) phys = (50.0 * (1.0 + sin((z / 23.0 - (z / 23)) * 360.0 * pi / 180.0))).to_i emot = (50.0 * (1.0 + sin((z / 28.0 - (z / 28)) * 360.0 * pi / 180.0))).to_i geist =(50.0 * (1.0 + sin((z / 33.0 - (z / 33)) * 360.0 * pi / 180.0))).to_i @@ -142,7 +143,7 @@ else print " Bad Condition | Good Condition\n" print " -------------------------+-------------------------\n" - for z in (dd - bd)..(dd - bd + display_period) + (dd - bd).step(dd - bd + display_period) do |z| phys, emot, geist = getPosition(z) printf "%04d.%02d.%02d : ", dd.year, dd.month, dd.day |
