sixarm_ruby_geometry 3.0.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eedd0bba34e7feed95380845cb2fef6a5209da2a
4
- data.tar.gz: 8778ff4c945d83045655413b80cf48bd2ce10519
3
+ metadata.gz: 182c1ba98030f00cea0a00603eda5227e0167cd8
4
+ data.tar.gz: fbfb9056a360957b1de3daf6d090d1d9768bf058
5
5
  SHA512:
6
- metadata.gz: c3df36dec2056d227ecd60314ac0afc140f530da2eae4bf5b5ade559ec218d749ff6a0edbdc54c410a255256ad964f9a294738dd141a389a206779f99a3c5b17
7
- data.tar.gz: e0552060e12e25e88ee913d269f8c374c38a94f1e4de49b873c99e81c541675e1e1810ae5a892ccf61400b099f367542e8bd95aeba0b203bba3c7a2a5b5c9b40
6
+ metadata.gz: 31d70e68bf44800812584212a4eec2d35bc25a41e877074dafbd2f7ba429a49b2c050c4267949ca9577745b550b6a7e32b19466758882daa4a8962780e6d8769
7
+ data.tar.gz: '0299b50bfe572b8f9c44191f57a9afc0d78753ac144754e53f582c96cb132dd34aa96a71f98d1713ff931add68feaad66552d8c86c7b95a78c44426c728dbc2a'
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -8,5 +8,16 @@
8
8
  #
9
9
  module Point
10
10
  module Array
11
+
12
+ def +(other)
13
+ raise ::IndexError unless self.size == other.size
14
+ self.size.times.map{|i| self[i] + other[i] }
15
+ end
16
+
17
+ def -(other)
18
+ raise ::IndexError unless self.size == other.size
19
+ self.size.times.map{|i| self[i] - other[i] }
20
+ end
21
+
11
22
  end
12
23
  end
@@ -28,6 +28,32 @@ module Point
28
28
  assert_equal(e0, c[0])
29
29
  end
30
30
 
31
+ def test_plus
32
+ a0 = fake_n
33
+ a1 = fake_n
34
+ a = C[a0, a1]
35
+ b0 = fake_n
36
+ b1 = fake_n
37
+ b = C[b0, b1]
38
+ c0 = a0 + b0
39
+ c1 = a1 + b1
40
+ c = C[c0, c1]
41
+ assert_equal(c, a + b)
42
+ end
43
+
44
+ def test_minus
45
+ a0 = fake_n
46
+ a1 = fake_n
47
+ a = C[a0, a1]
48
+ b0 = fake_n
49
+ b1 = fake_n
50
+ b = C[b0, b1]
51
+ c0 = a0 - b0
52
+ c1 = a1 - b1
53
+ c = C[c0, c1]
54
+ assert_equal(c, a - b)
55
+ end
56
+
31
57
  end
32
58
  end
33
59
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_geometry
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SixArm
@@ -44,7 +44,7 @@ cert_chain:
44
44
  2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
45
45
  n+ES/gQPOnvmVkLDGw==
46
46
  -----END CERTIFICATE-----
47
- date: 2015-08-13 00:00:00.000000000 Z
47
+ date: 2017-08-13 00:00:00.000000000 Z
48
48
  dependencies:
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: minitest
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "<"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sixarm_ruby_minitest_extensions
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.5
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.5
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rake
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -200,11 +214,12 @@ files:
200
214
  - test/sixarm_ruby_geometry_test/space_test.rb
201
215
  homepage: http://sixarm.com/
202
216
  licenses:
203
- - BSD
204
- - GPL
217
+ - Apache-2.0
218
+ - Artistic-2.0
219
+ - BSD-3-Clause
220
+ - GPL-3.0
205
221
  - MIT
206
- - PAL
207
- - Various
222
+ - MPL-2.0
208
223
  metadata: {}
209
224
  post_install_message:
210
225
  rdoc_options: []
@@ -222,10 +237,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
237
  version: '0'
223
238
  requirements: []
224
239
  rubyforge_project:
225
- rubygems_version: 2.4.8
240
+ rubygems_version: 2.6.12
226
241
  signing_key:
227
242
  specification_version: 4
228
- summary: 'SixArm.com » Ruby » Geometry modules: point, vector, volume, etc.'
243
+ summary: 'SixArm.com Ruby Geometry modules: point, vector, volume, etc.'
229
244
  test_files:
230
245
  - test/sixarm_ruby_geometry_test.rb
231
246
  - test/sixarm_ruby_geometry_test/point_test.rb
@@ -259,4 +274,3 @@ test_files:
259
274
  - test/sixarm_ruby_geometry_test/space/vector/d1_test.rb
260
275
  - test/sixarm_ruby_geometry_test/space/vector/d2_test.rb
261
276
  - test/sixarm_ruby_geometry_test/space/vector/d3_test.rb
262
- has_rdoc: true
metadata.gz.sig CHANGED
Binary file