equationoftime 4.1.5 → 4.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +13 -5
- data/.ruby-version +1 -1
- data/Gemfile +8 -2
- data/Gemfile.lock +18 -18
- data/Manifest.txt +5 -1
- data/README.rdoc +40 -17
- data/Rakefile +3 -3
- data/examples/{Equation_of_Time.jpg → Equation_of_Time.png} +0 -0
- data/examples/my_lst.rb +3 -1
- data/ext/eot/ceot.c +31 -6
- data/ext/eot/ceot.h +4 -0
- data/ext/eot/eot.c +19 -0
- data/lib/eot.rb +12 -10
- data/lib/eot/angle_displays.rb +3 -20
- data/lib/eot/angles.rb +39 -19
- data/lib/eot/constants.rb +2 -1
- data/lib/eot/deltas.rb +1 -0
- data/lib/eot/geo_lat_lng_smt.rb +1 -2
- data/lib/eot/init.rb +41 -35
- data/lib/eot/time_displays.rb +21 -4
- data/lib/eot/times.rb +37 -65
- data/lib/eot/trigonometric.rb +7 -7
- data/lib/eot/utilities.rb +15 -2
- data/lib/eot/version.rb +3 -1
- data/run_tests_eclipse.rb +1 -0
- data/test/eot/aliased_angles_spec.rb +45 -43
- data/test/eot/aliased_displays_spec.rb +10 -9
- data/test/eot/aliased_utilities_spec.rb +15 -13
- data/test/eot/angles_spec.rb +130 -127
- data/test/eot/constants_spec.rb +2 -1
- data/test/eot/displays_spec.rb +54 -51
- data/test/eot/geo_spec.rb +5 -5
- data/test/eot/init_spec.rb +4 -4
- data/test/eot/times_spec.rb +127 -65
- metadata +42 -59
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -1
- metadata.gz.sig +0 -0
data/lib/eot/trigonometric.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# class Eot file = trigometric.rb
|
2
|
+
# methods using trig functions
|
2
3
|
class Eot
|
3
|
-
include Math
|
4
4
|
# From trigometric.rb:
|
5
5
|
# cosine apparent longitude
|
6
6
|
# could be useful when dividing
|
7
7
|
def cosine_al_sun
|
8
|
-
cos_al_sun(
|
8
|
+
cos_al_sun(al_sun)
|
9
9
|
end
|
10
10
|
alias_method :cosine_apparent_longitude, :cosine_al_sun
|
11
11
|
alias_method :cosalsun, :cosine_al_sun
|
@@ -14,7 +14,7 @@ class Eot
|
|
14
14
|
# cosine true longitude
|
15
15
|
# used in solar right ascension
|
16
16
|
def cosine_tl_sun
|
17
|
-
cos_tl_sun(
|
17
|
+
cos_tl_sun(tl_sun)
|
18
18
|
end
|
19
19
|
alias_method :cosine_true_longitude, :cosine_tl_sun
|
20
20
|
|
@@ -22,7 +22,7 @@ class Eot
|
|
22
22
|
# cosine true obliquity
|
23
23
|
# used in solar right ascension and equation of equinox
|
24
24
|
def cosine_to_earth
|
25
|
-
cos_to_earth(
|
25
|
+
cos_to_earth(to_earth)
|
26
26
|
end
|
27
27
|
alias_method :cosine_true_obliquity, :cosine_to_earth
|
28
28
|
|
@@ -30,7 +30,7 @@ class Eot
|
|
30
30
|
# sine apparent longitude
|
31
31
|
# used in solar declination
|
32
32
|
def sine_al_sun
|
33
|
-
sin_al_sun(
|
33
|
+
sin_al_sun(al_sun)
|
34
34
|
end
|
35
35
|
alias_method :sine_apparent_longitude, :sine_al_sun
|
36
36
|
|
@@ -38,7 +38,7 @@ class Eot
|
|
38
38
|
# sine true longitude
|
39
39
|
# used in solar right ascension
|
40
40
|
def sine_tl_sun
|
41
|
-
sin_tl_sun(
|
41
|
+
sin_tl_sun(tl_sun)
|
42
42
|
end
|
43
43
|
alias_method :sine_true_longitude, :sine_tl_sun
|
44
44
|
|
@@ -46,6 +46,6 @@ class Eot
|
|
46
46
|
# sine true obliquity angle of Earth
|
47
47
|
# used in solar declination
|
48
48
|
def sine_to_earth
|
49
|
-
sin_to_earth(
|
49
|
+
sin_to_earth(to_earth)
|
50
50
|
end
|
51
51
|
end
|
data/lib/eot/utilities.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# utilities.rb
|
2
|
-
#
|
1
|
+
# class Eot file = utilities.rb
|
2
|
+
# methods for general use
|
3
3
|
class Eot
|
4
4
|
# From utilities.rb:
|
5
5
|
# A check for default J2000
|
@@ -29,6 +29,19 @@ class Eot
|
|
29
29
|
dt == 0 ? DT2000 : check_t_nil(dt)
|
30
30
|
end
|
31
31
|
|
32
|
+
# From utilities.rb:
|
33
|
+
# formats degree string
|
34
|
+
def f_string(sgn, u, m, s, ds)
|
35
|
+
sgn +
|
36
|
+
format('%03d', u) +
|
37
|
+
':' +
|
38
|
+
format('%02d', m) +
|
39
|
+
':' +
|
40
|
+
format('%02d', s) +
|
41
|
+
'.' +
|
42
|
+
format('%3.3d', ds)
|
43
|
+
end
|
44
|
+
|
32
45
|
# From utilities.rb:
|
33
46
|
# Keeps large angles in range of 360.0
|
34
47
|
# aliased by truncate
|
data/lib/eot/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
system 'bundle exec rake'
|
@@ -8,25 +8,26 @@ require 'eot'
|
|
8
8
|
|
9
9
|
aliased_angles = Eot.new
|
10
10
|
|
11
|
-
describe 'tests ajd of 2456885.0' do
|
11
|
+
describe 'tests ajd of 2456885.0 ' do
|
12
12
|
|
13
13
|
before(:each) do
|
14
14
|
aliased_angles.ajd = 2_456_885.0
|
15
15
|
ajd = aliased_angles.ajd
|
16
|
+
aliased_angles.ma_ta_set
|
16
17
|
# somtimes need date to check values somewhere else
|
17
18
|
aliased_angles.date = aliased_angles.ajd_to_datetime(ajd)
|
18
19
|
end
|
19
20
|
|
20
|
-
it 'expected
|
21
|
+
it 'expected 2_456_885.0 for aliased_angles.ajd 'do
|
21
22
|
assert_equal(2_456_885.0, aliased_angles.ajd)
|
22
23
|
end
|
23
24
|
|
24
|
-
it 'expected
|
25
|
-
aliased_angles.date
|
25
|
+
it 'expected "2014-08-15T12:00:00+00:00" from \
|
26
|
+
aliased_angles.date.to_s ' do
|
26
27
|
assert_equal('2014-08-15T12:00:00+00:00', aliased_angles.date.to_s)
|
27
28
|
end
|
28
29
|
|
29
|
-
it 'expected
|
30
|
+
it 'expected 3.8508003966038915 from aliased_angles.ma 'do
|
30
31
|
assert_equal(3.8508003966038915, aliased_angles.ma)
|
31
32
|
end
|
32
33
|
|
@@ -41,12 +42,12 @@ describe 'tests ajd of 2456885.0' do
|
|
41
42
|
aliased_angles.cosine_apparent_longitude)
|
42
43
|
end
|
43
44
|
|
44
|
-
it 'expected
|
45
|
+
it 'expected -0.7943772759574919 from \
|
45
46
|
aliased_angles.cosine_true_longitude()? ' do
|
46
47
|
assert_equal(-0.7943772759574919, aliased_angles.cosine_true_longitude)
|
47
48
|
end
|
48
49
|
|
49
|
-
it 'expected
|
50
|
+
it 'expected 0.9175115346811911 from \
|
50
51
|
aliased_angles.cosine_true_obliquity()? ' do
|
51
52
|
assert_equal(0.9175115346811911, aliased_angles.cosine_true_obliquity)
|
52
53
|
end
|
@@ -72,7 +73,7 @@ describe 'tests ajd of 2456885.0' do
|
|
72
73
|
aliased_angles.eccentricity_earth_orbit)
|
73
74
|
end
|
74
75
|
|
75
|
-
it 'expected
|
76
|
+
it 'expected -0.021413249720702462 from \
|
76
77
|
aliased_angles.equation_of_center()? ' do
|
77
78
|
assert_equal(-0.021413249720702462, aliased_angles.equation_of_center)
|
78
79
|
end
|
@@ -83,9 +84,9 @@ describe 'tests ajd of 2456885.0' do
|
|
83
84
|
aliased_angles.geometric_mean_longitude)
|
84
85
|
end
|
85
86
|
|
86
|
-
it 'expected 1.
|
87
|
-
aliased_angles.horizon_angle()? ' do
|
88
|
-
assert_equal(1.
|
87
|
+
it 'expected 1.5857841877939605 from \
|
88
|
+
aliased_angles.horizon_angle(1)? ' do
|
89
|
+
assert_equal(1.5857841877939605, aliased_angles.horizon_angle(1))
|
89
90
|
end
|
90
91
|
|
91
92
|
it 'expected 3.8508003966038915 from \
|
@@ -103,13 +104,13 @@ describe 'tests ajd of 2456885.0' do
|
|
103
104
|
assert_equal(0.40905940254265843, aliased_angles.mean_obliquity)
|
104
105
|
end
|
105
106
|
|
106
|
-
it 'expected
|
107
|
+
it 'expected 0.40905940254265843 from \
|
107
108
|
aliased_angles.mean_obliquity_of_ecliptic()? ' do
|
108
109
|
assert_equal(0.40905940254265843, \
|
109
110
|
aliased_angles.mean_obliquity_of_ecliptic)
|
110
111
|
end
|
111
112
|
|
112
|
-
it 'expected
|
113
|
+
it 'expected 0.40901870461547685 from \
|
113
114
|
aliased_angles.obliquity_correction()? ' do
|
114
115
|
assert_equal(0.40901870461547685, aliased_angles.obliquity_correction)
|
115
116
|
end
|
@@ -119,12 +120,12 @@ describe 'tests ajd of 2456885.0' do
|
|
119
120
|
assert_equal(2.5297411654316497, aliased_angles.right_ascension)
|
120
121
|
end
|
121
122
|
|
122
|
-
it 'expected
|
123
|
+
it 'expected 0.6074784519729512 from \
|
123
124
|
aliased_angles.sine_apparent_longitude()? ' do
|
124
125
|
assert_equal(0.6074784519729512, aliased_angles.sine_apparent_longitude)
|
125
126
|
end
|
126
127
|
|
127
|
-
it 'expected
|
128
|
+
it 'expected 0.6074246812917259 from \
|
128
129
|
aliased_angles.sine_true_longitude()? ' do
|
129
130
|
assert_equal(0.6074246812917259, aliased_angles.sine_true_longitude)
|
130
131
|
end
|
@@ -139,7 +140,7 @@ describe 'tests ajd of 2456885.0' do
|
|
139
140
|
assert_equal(2.48877803069344, aliased_angles.true_longitude)
|
140
141
|
end
|
141
142
|
|
142
|
-
it 'expected
|
143
|
+
it 'expected 2.5101242776531474 from \
|
143
144
|
aliased_angles.true_longitude_aries()? ' do
|
144
145
|
assert_equal(2.5101242776531474, aliased_angles.true_longitude_aries)
|
145
146
|
end
|
@@ -150,30 +151,31 @@ describe 'tests ajd of 2456885.0' do
|
|
150
151
|
end
|
151
152
|
end
|
152
153
|
|
153
|
-
describe 'tests ajd of 2455055.5' do
|
154
|
+
describe 'tests ajd of 2455055.5 ' do
|
154
155
|
|
155
156
|
before(:each) do
|
156
157
|
aliased_angles.ajd = 2_455_055.0
|
157
158
|
ajd = aliased_angles.ajd
|
159
|
+
aliased_angles.ma_ta_set
|
158
160
|
# check date for this ajd when needed.
|
159
161
|
aliased_angles.date = aliased_angles.ajd_to_datetime(ajd)
|
160
162
|
end
|
161
163
|
|
162
|
-
it 'expected
|
164
|
+
it 'expected 2_455_055.0, from aliased_angles.' do
|
163
165
|
assert_equal(2_455_055.0, aliased_angles.ajd)
|
164
166
|
end
|
165
167
|
|
166
|
-
it 'expected
|
167
|
-
aliased_angles.date.to_s' do
|
168
|
+
it 'expected "2009-08-11T12:00:00+00:00" from \
|
169
|
+
aliased_angles.date.to_s ' do
|
168
170
|
assert_equal('2009-08-11T12:00:00+00:00', aliased_angles.date.to_s)
|
169
171
|
end
|
170
172
|
|
171
|
-
it 'expected 3.7871218188949207, from aliased_angles.ma' do
|
173
|
+
it 'expected 3.7871218188949207, from aliased_angles.ma ' do
|
172
174
|
assert_equal(3.7871218188949207, aliased_angles.ma)
|
173
175
|
end
|
174
176
|
|
175
177
|
it 'expected 3.7871218188949207 from \
|
176
|
-
aliased_angles.ma from Eot_angles.mean_anomaly()' do
|
178
|
+
aliased_angles.ma from Eot_angles.mean_anomaly() ' do
|
177
179
|
assert_equal(3.7871218188949207, aliased_angles.mean_anomaly)
|
178
180
|
end
|
179
181
|
|
@@ -188,22 +190,22 @@ describe 'tests ajd of 2455055.5' do
|
|
188
190
|
aliased_angles.cosine_apparent_longitude)
|
189
191
|
end
|
190
192
|
|
191
|
-
it 'expected
|
193
|
+
it 'expected -0.7542060769936684 from \
|
192
194
|
aliased_angles.cosine_true_longitude()? ' do
|
193
195
|
assert_equal(-0.7542060769936684, aliased_angles.cosine_true_longitude)
|
194
196
|
end
|
195
197
|
|
196
|
-
it 'expected
|
198
|
+
it 'expected 0.9174818088112336 from \
|
197
199
|
aliased_angles.cosine_true_obliquity()? ' do
|
198
200
|
assert_equal(0.9174818088112336, aliased_angles.cosine_true_obliquity)
|
199
201
|
end
|
200
202
|
|
201
|
-
it 'expected
|
203
|
+
it 'expected 0.2642691272294404 from \
|
202
204
|
aliased_angles.declination()? ' do
|
203
|
-
assert_equal(0.
|
205
|
+
assert_equal(0.2642691272294404, aliased_angles.declination)
|
204
206
|
end
|
205
207
|
|
206
|
-
it 'expected
|
208
|
+
it 'expected -0.04234904897476355 from \
|
207
209
|
aliased_angles.delta_t_ecliptic()? ' do
|
208
210
|
assert_equal(-0.04234904897476355, aliased_angles.delta_t_ecliptic)
|
209
211
|
end
|
@@ -213,77 +215,77 @@ describe 'tests ajd of 2455055.5' do
|
|
213
215
|
assert_equal(0.019768413456709915, aliased_angles.delta_t_elliptic)
|
214
216
|
end
|
215
217
|
|
216
|
-
it 'expected
|
218
|
+
it 'expected 0.016704576164208475 from \
|
217
219
|
aliased_angles.eccentricity_earth_orbit()? ' do
|
218
220
|
assert_equal(0.016704576164208475, \
|
219
221
|
aliased_angles.eccentricity_earth_orbit)
|
220
222
|
end
|
221
223
|
|
222
|
-
it 'expected
|
224
|
+
it 'expected -0.019768413456709915 from \
|
223
225
|
aliased_angles.equation_of_center()? ' do
|
224
226
|
assert_equal(-0.019768413456709915, aliased_angles.equation_of_center)
|
225
227
|
end
|
226
228
|
|
227
|
-
it 'expected
|
229
|
+
it 'expected 2.445008945789877 from \
|
228
230
|
aliased_angles.geometric_mean_longitude()? ' do
|
229
231
|
assert_equal(2.445008945789877, aliased_angles.geometric_mean_longitude)
|
230
232
|
end
|
231
233
|
|
232
|
-
it 'expected
|
234
|
+
it 'expected 1.585863261753274 from \
|
233
235
|
aliased_angles.horizon_angle()? ' do
|
234
|
-
assert_equal(1.
|
236
|
+
assert_equal(1.585863261753274, aliased_angles.horizon_angle(1))
|
235
237
|
end
|
236
238
|
|
237
|
-
it 'expected
|
239
|
+
it 'expected 3.7871218188949207 from \
|
238
240
|
aliased_angles.mean_anomaly()? ' do
|
239
241
|
assert_equal(3.7871218188949207, aliased_angles.mean_anomaly)
|
240
242
|
end
|
241
243
|
|
242
|
-
it 'expected
|
244
|
+
it 'expected 2.444907382260759 from \
|
243
245
|
aliased_angles.mean_longitude_aries()? ' do
|
244
246
|
assert_equal(2.444907382260759, aliased_angles.mean_longitude_aries)
|
245
247
|
end
|
246
248
|
|
247
|
-
it 'expected
|
249
|
+
it 'expected 0.4090707793981491 from \
|
248
250
|
aliased_angles.mean_obliquity()? ' do
|
249
251
|
assert_equal(0.4090707793981491, aliased_angles.mean_obliquity)
|
250
252
|
end
|
251
253
|
|
252
|
-
it 'expected
|
254
|
+
it 'expected 0.4090934409048494 from \
|
253
255
|
aliased_angles.obliquity_correction()? ' do
|
254
256
|
assert_equal(0.4090934409048494, aliased_angles.obliquity_correction)
|
255
257
|
end
|
256
258
|
|
257
|
-
it 'expected
|
259
|
+
it 'expected 2.467563113547267 from \
|
258
260
|
aliased_angles.right_ascension()? ' do
|
259
261
|
assert_equal(2.467563113547267, aliased_angles.right_ascension)
|
260
262
|
end
|
261
263
|
|
262
|
-
it 'expected
|
264
|
+
it 'expected 0.6566577566139093 from \
|
263
265
|
aliased_angles.sine_apparent_longitude()? ' do
|
264
266
|
assert_equal(0.6566577566139093, aliased_angles.sine_apparent_longitude)
|
265
267
|
end
|
266
268
|
|
267
|
-
it 'expected
|
269
|
+
it 'expected 0.6566377946979757 from \
|
268
270
|
aliased_angles.sine_true_longitude()? ' do
|
269
271
|
assert_equal(0.6566377946979757, aliased_angles.sine_true_longitude)
|
270
272
|
end
|
271
273
|
|
272
|
-
it 'expected
|
274
|
+
it 'expected 3.767353405438211 from aliased_angles.true_anomaly()? ' do
|
273
275
|
assert_equal(3.767353405438211, aliased_angles.true_anomaly)
|
274
276
|
end
|
275
277
|
|
276
|
-
it 'expected
|
278
|
+
it 'expected 2.4252405323331674 from \
|
277
279
|
aliased_angles.true_longitude()? ' do
|
278
280
|
assert_equal(2.4252405323331674, aliased_angles.true_longitude)
|
279
281
|
end
|
280
282
|
|
281
|
-
it 'expected
|
283
|
+
it 'expected 2.4449774607872907 from \
|
282
284
|
aliased_angles.true_longitude_aries()? ' do
|
283
285
|
assert_equal(2.4449774607872907, aliased_angles.true_longitude_aries)
|
284
286
|
end
|
285
287
|
|
286
|
-
it 'expected
|
288
|
+
it 'expected 0.4090934409048494 from \
|
287
289
|
aliased_angles.true_obliquity()? ' do
|
288
290
|
assert_equal(0.4090934409048494, aliased_angles.true_obliquity)
|
289
291
|
end
|
@@ -13,6 +13,7 @@ describe 'aliased_displays using ajd of 2456885.0' do
|
|
13
13
|
before(:each) do
|
14
14
|
aliased_displays.ajd = 2_456_885.0
|
15
15
|
ajd = aliased_displays.ajd
|
16
|
+
aliased_displays.ma_ta_set
|
16
17
|
# check date for this ajd when needed.
|
17
18
|
aliased_displays.date = aliased_displays.ajd_to_datetime(ajd)
|
18
19
|
|
@@ -36,9 +37,9 @@ describe 'aliased_displays using ajd of 2456885.0' do
|
|
36
37
|
assert_equal '+142:35:33.356', aliased_displays.apparent_longitude_string
|
37
38
|
end
|
38
39
|
|
39
|
-
it 'expected "+013:58:51.
|
40
|
+
it 'expected "+013:58:51.522" \
|
40
41
|
from aliased_displays.declination_string()? ' do
|
41
|
-
assert_equal '+013:58:51.
|
42
|
+
assert_equal '+013:58:51.522', aliased_displays.declination_string
|
42
43
|
end
|
43
44
|
|
44
45
|
it 'expected "-04m, 29.2s" from \
|
@@ -81,9 +82,9 @@ describe 'aliased_displays using ajd of 2456885.0' do
|
|
81
82
|
aliased_displays.julian_period_day_fraction_to_time(0)
|
82
83
|
end
|
83
84
|
|
84
|
-
it 'expected "+220:38:04.
|
85
|
+
it 'expected "+220:38:04.598" from \
|
85
86
|
aliased_displays.mean_anomaly_string()? ' do
|
86
|
-
assert_equal '+220:38:04.
|
87
|
+
assert_equal '+220:38:04.598', aliased_displays.mean_anomaly_string
|
87
88
|
end
|
88
89
|
|
89
90
|
it 'expected "+144:56:36.571" from \
|
@@ -91,19 +92,19 @@ describe 'aliased_displays using ajd of 2456885.0' do
|
|
91
92
|
assert_equal '+144:56:36.571', aliased_displays.right_ascension_string
|
92
93
|
end
|
93
94
|
|
94
|
-
it 'expected "+219:24:27.
|
95
|
+
it 'expected "+219:24:27.798" from \
|
95
96
|
aliased_displays.true_anomaly_string()? ' do
|
96
|
-
assert_equal '+219:24:27.
|
97
|
+
assert_equal '+219:24:27.798', aliased_displays.true_anomaly_string
|
97
98
|
end
|
98
99
|
|
99
|
-
it 'expected "+142:35:47.
|
100
|
+
it 'expected "+142:35:47.318" from \
|
100
101
|
aliased_displays.true_longitude_string()? ' do
|
101
102
|
assert_equal '+142:35:47.318', aliased_displays.true_longitude_string
|
102
103
|
end
|
103
104
|
|
104
|
-
it 'expected "+023:26:06.
|
105
|
+
it 'expected "+023:26:06.164" from \
|
105
106
|
aliased_displays.true_obliquity_string()? ' do
|
106
|
-
assert_equal '+023:26:06.
|
107
|
+
assert_equal '+023:26:06.164', aliased_displays.true_obliquity_string
|
107
108
|
end
|
108
109
|
|
109
110
|
end
|
@@ -1,32 +1,34 @@
|
|
1
1
|
# aliased_utilities_spec.rb
|
2
|
-
|
2
|
+
gem 'minitest'
|
3
|
+
require 'minitest/autorun'
|
3
4
|
lib = File.expand_path('../../../lib', __FILE__)
|
4
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
6
|
require 'eot'
|
6
7
|
|
7
|
-
|
8
|
+
aliased_utilities = Eot.new
|
8
9
|
|
9
10
|
describe 'tests ajd of 2456885.0' do
|
10
11
|
|
11
12
|
before(:each) do
|
12
|
-
|
13
|
-
ajd =
|
13
|
+
aliased_utilities.ajd = 2_456_885.0
|
14
|
+
ajd = aliased_utilities.ajd
|
15
|
+
aliased_utilities.ma_ta_set
|
14
16
|
# check date for this ajd when needed.
|
15
|
-
|
17
|
+
aliased_utilities.date = aliased_utilities.ajd_to_datetime(ajd)
|
16
18
|
end
|
17
19
|
|
18
|
-
it 'expected 2456885.0 for
|
19
|
-
assert_equal 2_456_885.0,
|
20
|
+
it 'expected 2456885.0 for aliased_utilities.ajd'do
|
21
|
+
assert_equal 2_456_885.0, aliased_utilities.ajd
|
20
22
|
end
|
21
23
|
|
22
|
-
it 'expected 3.8508003966038915 for
|
23
|
-
assert_equal 3.8508003966038915,
|
24
|
+
it 'expected 3.8508003966038915 for aliased_utilities.ma'do
|
25
|
+
assert_equal 3.8508003966038915, aliased_utilities.ma
|
24
26
|
end
|
25
27
|
|
26
|
-
it 'expected 0.0 returned by
|
27
|
-
assert_equal 0.0,
|
28
|
-
assert_equal 0.0,
|
29
|
-
assert_equal 0.0,
|
28
|
+
it 'expected 0.0 returned by aliased_utilities.truncate() ' do
|
29
|
+
assert_equal 0.0, aliased_utilities.truncate
|
30
|
+
assert_equal 0.0, aliased_utilities.truncate(nil)
|
31
|
+
assert_equal 0.0, aliased_utilities.truncate(0)
|
30
32
|
end
|
31
33
|
|
32
34
|
end
|