math_demo 0.2.0-java → 0.6.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
- SHA1:
3
- metadata.gz: 1a614497ed312619c49a17d3244e2036885b9038
4
- data.tar.gz: 5f30488fbee2fc8910b7ecc2f9a2571704ce1459
2
+ SHA256:
3
+ metadata.gz: 1ae001a1788c1fd9325730e3fef92f7c70cf4a3eef613f28471eb103682696e2
4
+ data.tar.gz: d6f440d556cac0a5b54efbddf6475e6887de97968d157bd7dffeafa15440c5d3
5
5
  SHA512:
6
- metadata.gz: dc643976976cf90b0a33980fb98111f18e84da2b4c5420ed9911ae44ef9b342b527eddc6b667eb9b1f1f4e811e4d4dfe81f50ebc22c8d7c7afe8655685db7214
7
- data.tar.gz: 21756afc665ac76ecce61a2f4e0fef091b4969d4a5b8fd801829d68f3dca840debc8e8d80dbed0179902f6a2b392d41652cc9c67cad9c97e95d3a205d35fe07a
6
+ metadata.gz: cb4215258ad859aa2ea7a15466d67fc4259ee96d55f2efc0c7b5cdb3944e975a5197bf9c5758f0c9829c9df67f03d35a98cbd278f1a381aa3bde62277759c6ae
7
+ data.tar.gz: fcf6605c2e53630bfb17cda2ce9defd5fdc445c9f236244ccbece592b09f0833154e1d00784c97ebdc23ddf9a340da368cade2727c143571bb32f85cb7ac36b6
data/lib/circles.rb CHANGED
@@ -52,4 +52,3 @@ class Circles < Propane::App
52
52
  end
53
53
  end
54
54
 
55
- Circles.new
@@ -2,7 +2,7 @@
2
2
  require 'forwardable'
3
3
  MAX_POINT = 3
4
4
  # A collection of a maximum of 3 points in the processing world
5
- # includes a collinearity test using Vec2D
5
+ # includes a collinearity test using Vec2D positions
6
6
  class TrianglePoints
7
7
  extend Forwardable
8
8
  def_delegators(:@points, :each, :map, :size, :shift, :clear, :[])
@@ -20,7 +20,8 @@ class TrianglePoints
20
20
  end
21
21
 
22
22
  def collinear?
23
- full? ? (positions[0] - positions[1]).cross(positions[1] - positions[2]).zero? : false
23
+ first, second, third = positions
24
+ full? ? (first - second).cross(second - third).zero? : false
24
25
  end
25
26
 
26
27
  # returns positions as an array of Vec2D
@@ -2,15 +2,14 @@
2
2
  # particle and triangle point
3
3
  class TPoint
4
4
  include Propane::Proxy
5
- attr_reader :pos, :vel, :accel, :xbound, :ybound
5
+ attr_reader :pos, :vel, :accel, :bounds
6
6
  # attr_reader :width, :height # uncomment for testing
7
7
 
8
8
  def initialize(position)
9
9
  @pos = position
10
10
  @vel = Vec2D.new
11
11
  @accel = Vec2D.random
12
- @xbound = Boundary.new(0, width)
13
- @ybound = Boundary.new(0, height)
12
+ @bounds = [Boundary.new(0, width), Boundary.new(0, height)]
14
13
  end
15
14
 
16
15
  def direction(acc)
@@ -33,8 +32,8 @@ class TPoint
33
32
  private
34
33
 
35
34
  def check_bounds
36
- @vel.x *= -1 if xbound.exclude? pos.x
37
- @vel.y *= -1 if ybound.exclude? pos.y
35
+ @vel.x *= -1 if bounds[0].exclude? pos.x
36
+ @vel.y *= -1 if bounds[1].exclude? pos.y
38
37
  end
39
38
  end
40
39
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # A wrapper for version
3
3
  module MathDemo
4
- VERSION = '0.2.0'.freeze
4
+ VERSION = '0.6.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.2.0
4
+ version: 0.6.0
5
5
  platform: java
6
6
  authors:
7
7
  - monkstone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-31 00:00:00.000000000 Z
11
+ date: 2021-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: propane
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.3'
19
+ version: '3.11'
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.3'
26
+ version: '3.11'
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
@@ -52,7 +52,9 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.10'
55
- description: " Math Demo uses propane (a ruby wrapper for the processing art framework)\n"
55
+ description: |2
56
+ Geomerative art using the ruby Matrix class to generate circumcircles around
57
+ triangles, created from moving points
56
58
  email: mamba2928@yahoo.co.uk
57
59
  executables:
58
60
  - math_demo
@@ -65,11 +67,11 @@ files:
65
67
  - lib/math_demo/t_points.rb
66
68
  - lib/math_demo/triangle_point.rb
67
69
  - lib/math_demo/version.rb
68
- homepage: https://ruby-processing.github.io/propane/
70
+ homepage: https://ruby-processing.github.io/math_demo/
69
71
  licenses:
70
72
  - GPL-3.0
71
73
  metadata: {}
72
- post_install_message: Congratulations you've just installed a propane gem.
74
+ post_install_message: Congratulations you've just installed propane.
73
75
  rdoc_options: []
74
76
  require_paths:
75
77
  - lib
@@ -77,16 +79,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
79
  requirements:
78
80
  - - ">="
79
81
  - !ruby/object:Gem::Version
80
- version: '2.3'
82
+ version: '2.6'
81
83
  required_rubygems_version: !ruby/object:Gem::Requirement
82
84
  requirements:
83
85
  - - ">="
84
86
  - !ruby/object:Gem::Version
85
87
  version: '0'
86
88
  requirements: []
87
- rubyforge_project:
88
- rubygems_version: 2.5.1
89
+ rubygems_version: 3.1.2
89
90
  signing_key:
90
91
  specification_version: 4
91
- summary: Example of creating a propane app.
92
+ summary: An example of a propane app as gem.
92
93
  test_files: []