eymiha_math 1.0.0 → 1.0.1
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.
- data/gem_package.rb +1 -2
- data/lib/eymiha_math.rb +1 -0
- metadata +41 -59
- data/html/classes/Numeric.html +0 -324
- data/html/classes/Numeric.src/M000001.html +0 -18
- data/html/classes/Numeric.src/M000002.html +0 -18
- data/html/classes/Numeric.src/M000003.html +0 -18
- data/html/classes/Numeric.src/M000005.html +0 -23
- data/html/classes/Numeric.src/M000006.html +0 -18
- data/html/classes/Numeric.src/M000007.html +0 -24
- data/html/classes/Numeric.src/M000008.html +0 -19
- data/html/classes/Numeric.src/M000009.html +0 -18
- data/html/classes/Numeric.src/M000010.html +0 -18
- data/html/created.rid +0 -1
- data/html/files/lib/eymiha/math/approximately_equals_rb.html +0 -121
- data/html/files/lib/eymiha/math/fraction_rb.html +0 -117
- data/html/files/lib/eymiha/math/rectify_rb.html +0 -123
- data/html/files/lib/eymiha/math_rb.html +0 -110
- data/html/fr_class_index.html +0 -27
- data/html/fr_file_index.html +0 -30
- data/html/fr_method_index.html +0 -36
- data/html/index.html +0 -24
- data/html/rdoc-style.css +0 -208
data/gem_package.rb
CHANGED
@@ -4,7 +4,7 @@ class GemPackage
|
|
4
4
|
|
5
5
|
def initialize
|
6
6
|
@name = 'eymiha_math'
|
7
|
-
@version = '1.0.
|
7
|
+
@version = '1.0.1'
|
8
8
|
@files = FileList[
|
9
9
|
'*.rb',
|
10
10
|
'lib/**/*',
|
@@ -19,7 +19,6 @@ class GemPackage
|
|
19
19
|
s.summary = "Eymiha basic math extensions"
|
20
20
|
s.files = files.to_a
|
21
21
|
s.require_path = 'lib'
|
22
|
-
s.autorequire = name
|
23
22
|
s.has_rdoc = true
|
24
23
|
s.rdoc_options << "--all"
|
25
24
|
s.author = "Dave Anderson"
|
data/lib/eymiha_math.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'eymiha/math'
|
metadata
CHANGED
@@ -1,33 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: eymiha_math
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.0.
|
7
|
-
date: 2008-05-08 00:00:00 -04:00
|
8
|
-
summary: Eymiha basic math extensions
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: dave@eymiha.com
|
12
|
-
homepage: http://www.eymiha.com
|
13
|
-
rubyforge_project: cori
|
14
|
-
description:
|
15
|
-
autorequire: eymiha_math
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 1.0.1
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Dave Anderson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-09-15 00:00:00 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: dave@eymiha.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files: []
|
23
|
+
|
31
24
|
files:
|
32
25
|
- gem_package.rb
|
33
26
|
- rakefile.rb
|
@@ -37,46 +30,35 @@ files:
|
|
37
30
|
- lib/eymiha/math/fraction.rb
|
38
31
|
- lib/eymiha/math/rectify.rb
|
39
32
|
- lib/eymiha/math.rb
|
33
|
+
- lib/eymiha_math.rb
|
40
34
|
- test/tc_approximately_equals.rb
|
41
35
|
- test/tc_fraction.rb
|
42
36
|
- test/tc_rectify.rb
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
- html/classes/Numeric.src/M000001.html
|
47
|
-
- html/classes/Numeric.src/M000002.html
|
48
|
-
- html/classes/Numeric.src/M000003.html
|
49
|
-
- html/classes/Numeric.src/M000005.html
|
50
|
-
- html/classes/Numeric.src/M000006.html
|
51
|
-
- html/classes/Numeric.src/M000007.html
|
52
|
-
- html/classes/Numeric.src/M000008.html
|
53
|
-
- html/classes/Numeric.src/M000009.html
|
54
|
-
- html/classes/Numeric.src/M000010.html
|
55
|
-
- html/created.rid
|
56
|
-
- html/files
|
57
|
-
- html/files/lib
|
58
|
-
- html/files/lib/eymiha
|
59
|
-
- html/files/lib/eymiha/math
|
60
|
-
- html/files/lib/eymiha/math/approximately_equals_rb.html
|
61
|
-
- html/files/lib/eymiha/math/fraction_rb.html
|
62
|
-
- html/files/lib/eymiha/math/rectify_rb.html
|
63
|
-
- html/files/lib/eymiha/math_rb.html
|
64
|
-
- html/fr_class_index.html
|
65
|
-
- html/fr_file_index.html
|
66
|
-
- html/fr_method_index.html
|
67
|
-
- html/index.html
|
68
|
-
- html/rdoc-style.css
|
69
|
-
test_files: []
|
70
|
-
|
37
|
+
has_rdoc: true
|
38
|
+
homepage: http://www.eymiha.com
|
39
|
+
post_install_message:
|
71
40
|
rdoc_options:
|
72
41
|
- --all
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: "0"
|
49
|
+
version:
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: "0"
|
55
|
+
version:
|
79
56
|
requirements: []
|
80
57
|
|
81
|
-
|
58
|
+
rubyforge_project: cori
|
59
|
+
rubygems_version: 1.2.0
|
60
|
+
signing_key:
|
61
|
+
specification_version: 2
|
62
|
+
summary: Eymiha basic math extensions
|
63
|
+
test_files: []
|
82
64
|
|
data/html/classes/Numeric.html
DELETED
@@ -1,324 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Numeric</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Numeric</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/eymiha/math/approximately_equals_rb.html">
|
59
|
-
lib/eymiha/math/approximately_equals.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../files/lib/eymiha/math/fraction_rb.html">
|
63
|
-
lib/eymiha/math/fraction.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
<a href="../files/lib/eymiha/math/rectify_rb.html">
|
67
|
-
lib/eymiha/math/rectify.rb
|
68
|
-
</a>
|
69
|
-
<br />
|
70
|
-
</td>
|
71
|
-
</tr>
|
72
|
-
|
73
|
-
<tr class="top-aligned-row">
|
74
|
-
<td><strong>Parent:</strong></td>
|
75
|
-
<td>
|
76
|
-
Object
|
77
|
-
</td>
|
78
|
-
</tr>
|
79
|
-
</table>
|
80
|
-
</div>
|
81
|
-
<!-- banner header -->
|
82
|
-
|
83
|
-
<div id="bodyContent">
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
<div id="contextContent">
|
88
|
-
|
89
|
-
<div id="description">
|
90
|
-
<p>
|
91
|
-
Behavior added to <a href="Numeric.html">Numeric</a> by eymiha_math.
|
92
|
-
</p>
|
93
|
-
|
94
|
-
</div>
|
95
|
-
|
96
|
-
|
97
|
-
</div>
|
98
|
-
|
99
|
-
<div id="method-list">
|
100
|
-
<h3 class="section-bar">Methods</h3>
|
101
|
-
|
102
|
-
<div class="name-list">
|
103
|
-
<a href="#M000004">=~</a>
|
104
|
-
<a href="#M000003">approximately_equals?</a>
|
105
|
-
<a href="#M000010">at_least</a>
|
106
|
-
<a href="#M000009">at_most</a>
|
107
|
-
<a href="#M000008">cut_rectify</a>
|
108
|
-
<a href="#M000001">epsilon</a>
|
109
|
-
<a href="#M000002">epsilon=</a>
|
110
|
-
<a href="#M000006">round_to_nearest</a>
|
111
|
-
<a href="#M000005">with_fraction</a>
|
112
|
-
<a href="#M000007">wrap_rectify</a>
|
113
|
-
</div>
|
114
|
-
</div>
|
115
|
-
|
116
|
-
</div>
|
117
|
-
|
118
|
-
|
119
|
-
<!-- if includes -->
|
120
|
-
|
121
|
-
<div id="section">
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<!-- if method_list -->
|
131
|
-
<div id="methods">
|
132
|
-
<h3 class="section-bar">Public Class methods</h3>
|
133
|
-
|
134
|
-
<div id="method-M000001" class="method-detail">
|
135
|
-
<a name="M000001"></a>
|
136
|
-
|
137
|
-
<div class="method-heading">
|
138
|
-
<a href="Numeric.src/M000001.html" target="Code" class="method-signature"
|
139
|
-
onclick="popupCode('Numeric.src/M000001.html');return false;">
|
140
|
-
<span class="method-name">epsilon</span><span class="method-args">()</span>
|
141
|
-
</a>
|
142
|
-
</div>
|
143
|
-
|
144
|
-
<div class="method-description">
|
145
|
-
<p>
|
146
|
-
The default distance from a <a href="Numeric.html">Numeric</a> below which
|
147
|
-
it is considered to be approximately equal to a another <a
|
148
|
-
href="Numeric.html">Numeric</a>.
|
149
|
-
</p>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
|
153
|
-
<div id="method-M000002" class="method-detail">
|
154
|
-
<a name="M000002"></a>
|
155
|
-
|
156
|
-
<div class="method-heading">
|
157
|
-
<a href="Numeric.src/M000002.html" target="Code" class="method-signature"
|
158
|
-
onclick="popupCode('Numeric.src/M000002.html');return false;">
|
159
|
-
<span class="method-name">epsilon=</span><span class="method-args">(epsilon)</span>
|
160
|
-
</a>
|
161
|
-
</div>
|
162
|
-
|
163
|
-
<div class="method-description">
|
164
|
-
<p>
|
165
|
-
Sets the default distance for approximately equals comparisons.
|
166
|
-
</p>
|
167
|
-
</div>
|
168
|
-
</div>
|
169
|
-
|
170
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
171
|
-
|
172
|
-
<div id="method-M000004" class="method-detail">
|
173
|
-
<a name="M000004"></a>
|
174
|
-
|
175
|
-
<div class="method-heading">
|
176
|
-
<span class="method-name">=~</span><span class="method-args">(value,epsilon=@@epsilon)</span>
|
177
|
-
</div>
|
178
|
-
|
179
|
-
<div class="method-description">
|
180
|
-
<p>
|
181
|
-
Alias for approximately_equals?
|
182
|
-
</p>
|
183
|
-
</div>
|
184
|
-
</div>
|
185
|
-
|
186
|
-
<div id="method-M000003" class="method-detail">
|
187
|
-
<a name="M000003"></a>
|
188
|
-
|
189
|
-
<div class="method-heading">
|
190
|
-
<a href="Numeric.src/M000003.html" target="Code" class="method-signature"
|
191
|
-
onclick="popupCode('Numeric.src/M000003.html');return false;">
|
192
|
-
<span class="method-name">approximately_equals?</span><span class="method-args">(value,epsilon=@@epsilon)</span>
|
193
|
-
</a>
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<div class="method-description">
|
197
|
-
<p>
|
198
|
-
returns true if the difference between the instance and the given <a
|
199
|
-
href="Numeric.html">Numeric</a> is less than the given distance.
|
200
|
-
</p>
|
201
|
-
</div>
|
202
|
-
</div>
|
203
|
-
|
204
|
-
<div id="method-M000010" class="method-detail">
|
205
|
-
<a name="M000010"></a>
|
206
|
-
|
207
|
-
<div class="method-heading">
|
208
|
-
<a href="Numeric.src/M000010.html" target="Code" class="method-signature"
|
209
|
-
onclick="popupCode('Numeric.src/M000010.html');return false;">
|
210
|
-
<span class="method-name">at_least</span><span class="method-args">(low=0)</span>
|
211
|
-
</a>
|
212
|
-
</div>
|
213
|
-
|
214
|
-
<div class="method-description">
|
215
|
-
<p>
|
216
|
-
Constrains a value to a lower limit.
|
217
|
-
</p>
|
218
|
-
</div>
|
219
|
-
</div>
|
220
|
-
|
221
|
-
<div id="method-M000009" class="method-detail">
|
222
|
-
<a name="M000009"></a>
|
223
|
-
|
224
|
-
<div class="method-heading">
|
225
|
-
<a href="Numeric.src/M000009.html" target="Code" class="method-signature"
|
226
|
-
onclick="popupCode('Numeric.src/M000009.html');return false;">
|
227
|
-
<span class="method-name">at_most</span><span class="method-args">(high=0)</span>
|
228
|
-
</a>
|
229
|
-
</div>
|
230
|
-
|
231
|
-
<div class="method-description">
|
232
|
-
<p>
|
233
|
-
Constrains a value to an upper limit.
|
234
|
-
</p>
|
235
|
-
</div>
|
236
|
-
</div>
|
237
|
-
|
238
|
-
<div id="method-M000008" class="method-detail">
|
239
|
-
<a name="M000008"></a>
|
240
|
-
|
241
|
-
<div class="method-heading">
|
242
|
-
<a href="Numeric.src/M000008.html" target="Code" class="method-signature"
|
243
|
-
onclick="popupCode('Numeric.src/M000008.html');return false;">
|
244
|
-
<span class="method-name">cut_rectify</span><span class="method-args">(high=1,low=0)</span>
|
245
|
-
</a>
|
246
|
-
</div>
|
247
|
-
|
248
|
-
<div class="method-description">
|
249
|
-
<p>
|
250
|
-
Treats the low and high as limits, returning low or high if the instance is
|
251
|
-
respectively below or above these values, or the instance if between the
|
252
|
-
two.
|
253
|
-
</p>
|
254
|
-
</div>
|
255
|
-
</div>
|
256
|
-
|
257
|
-
<div id="method-M000006" class="method-detail">
|
258
|
-
<a name="M000006"></a>
|
259
|
-
|
260
|
-
<div class="method-heading">
|
261
|
-
<a href="Numeric.src/M000006.html" target="Code" class="method-signature"
|
262
|
-
onclick="popupCode('Numeric.src/M000006.html');return false;">
|
263
|
-
<span class="method-name">round_to_nearest</span><span class="method-args">(denominator=1)</span>
|
264
|
-
</a>
|
265
|
-
</div>
|
266
|
-
|
267
|
-
<div class="method-description">
|
268
|
-
<p>
|
269
|
-
Returns a numeric value such that any remainder is evenly divided by the
|
270
|
-
given denominator.
|
271
|
-
</p>
|
272
|
-
</div>
|
273
|
-
</div>
|
274
|
-
|
275
|
-
<div id="method-M000005" class="method-detail">
|
276
|
-
<a name="M000005"></a>
|
277
|
-
|
278
|
-
<div class="method-heading">
|
279
|
-
<a href="Numeric.src/M000005.html" target="Code" class="method-signature"
|
280
|
-
onclick="popupCode('Numeric.src/M000005.html');return false;">
|
281
|
-
<span class="method-name">with_fraction</span><span class="method-args">(denominator=1,separator='-',show_zero=false)</span>
|
282
|
-
</a>
|
283
|
-
</div>
|
284
|
-
|
285
|
-
<div class="method-description">
|
286
|
-
<p>
|
287
|
-
Renders a numeric value as a whole number and a fraction with a given
|
288
|
-
denominator, separated with a given separator, and optionally showing
|
289
|
-
fractions with a numerator of zero.
|
290
|
-
</p>
|
291
|
-
</div>
|
292
|
-
</div>
|
293
|
-
|
294
|
-
<div id="method-M000007" class="method-detail">
|
295
|
-
<a name="M000007"></a>
|
296
|
-
|
297
|
-
<div class="method-heading">
|
298
|
-
<a href="Numeric.src/M000007.html" target="Code" class="method-signature"
|
299
|
-
onclick="popupCode('Numeric.src/M000007.html');return false;">
|
300
|
-
<span class="method-name">wrap_rectify</span><span class="method-args">(high=1,low=0)</span>
|
301
|
-
</a>
|
302
|
-
</div>
|
303
|
-
|
304
|
-
<div class="method-description">
|
305
|
-
<p>
|
306
|
-
Treats the interval between low and high as a cycle, returning the result
|
307
|
-
of wrapping the instance around this interval.
|
308
|
-
</p>
|
309
|
-
</div>
|
310
|
-
</div>
|
311
|
-
|
312
|
-
|
313
|
-
</div>
|
314
|
-
|
315
|
-
|
316
|
-
</div>
|
317
|
-
|
318
|
-
|
319
|
-
<div id="validator-badges">
|
320
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
321
|
-
</div>
|
322
|
-
|
323
|
-
</body>
|
324
|
-
</html>
|