math_demo 0.4.0-java → 0.5.0-java

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
  SHA256:
3
- metadata.gz: 9440ebf1b2ebb239ab1bcfd6e8cde4bab388cd98c4de06b085b9e0eed889dd1b
4
- data.tar.gz: b9a6e784ce7de5e53b1386931953d5867f55cb31035bd978a6749cdec590dd8a
3
+ metadata.gz: 7aac0578e276d9a16a504b26bcc16e5f38945d5f8deb3ca873bfdf53ae4fdcd5
4
+ data.tar.gz: df974bdfe087abc84ce5987af43396253ee7468bf2008b4c020fe239c7faa129
5
5
  SHA512:
6
- metadata.gz: 0a806d4daeb40f43748f62ec52280672279bc7ff1a5a374d0d2fffcec4d92f821641967d4f82315b14cdd88d5293aa500eb9f3c03a5f3e1e30d662ab098e6382
7
- data.tar.gz: a3ce87fdcb1eac3fd8d3522699bf729f3aaee5620c8c13de03692a2cd5556ef25556cd36b89dae0b11f293e5548c43e6e80cca031470d2821eb50de19f9e2677
6
+ metadata.gz: 8fb663322518eaa16d80455f5c9fc0a327df27a8af6c36c352ef43947b8d5c685440cf2c997484898d99ee2a69bd6a54e2e6201c2b7b8a2205e1c0355e1620b4
7
+ data.tar.gz: 8a9f2eef85aecf8e09c3df325bbd7c8413c8a90ebd5b2d07985313c8602541f9381a9f23ffa927c5feee6a8f23b2c5aae51e9bf7b58dbf2edceec4995075285c
@@ -9,7 +9,7 @@ class TPoint
9
9
  @pos = position
10
10
  @vel = Vec2D.new
11
11
  @accel = Vec2D.random
12
- @bounds = [Boundary.new(0, width), Boundary.new(0, height)]
12
+ @bounds = Boundary.new(Vec2D.new, Vec2D.new(width, height))
13
13
  end
14
14
 
15
15
  def direction(acc)
@@ -32,14 +32,18 @@ class TPoint
32
32
  private
33
33
 
34
34
  def check_bounds
35
- @vel.x *= -1 if bounds[0].exclude? pos.x
36
- @vel.y *= -1 if bounds[1].exclude? pos.y
35
+ @vel.x *= -1 if bounds.exclude_x? pos
36
+ @vel.y *= -1 if bounds.exclude_y? pos
37
37
  end
38
38
  end
39
39
 
40
40
  # we are looking for excluded values
41
41
  Boundary = Struct.new(:lower, :upper) do
42
- def exclude?(val)
43
- true unless (lower...upper).cover? val
42
+ def exclude_x?(val)
43
+ !((lower.x...upper.x).cover? val.x)
44
+ end
45
+
46
+ def exclude_y?(val)
47
+ !((lower.y...upper.y).cover? val.y)
44
48
  end
45
49
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # A wrapper for version
3
3
  module MathDemo
4
- VERSION = '0.4.0'.freeze
4
+ VERSION = '0.5.0'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: math_demo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: java
6
6
  authors:
7
7
  - monkstone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-22 00:00:00.000000000 Z
11
+ date: 2020-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: propane
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.6'
19
+ version: '3.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.6'
26
+ version: '3.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '12'
33
+ version: '13'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '12'
40
+ version: '13'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.10'
47
+ version: '5.14'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.10'
54
+ version: '5.14'
55
55
  description: |2
56
56
  Geomerative art using the ruby Matrix class to generate circumcircles around
57
57
  triangles, created from moving points
@@ -79,14 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '2.3'
82
+ version: '2.5'
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.0.1
89
+ rubygems_version: 3.1.2
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: An example of a propane app as gem.