rays 0.1.21 → 0.1.22

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/lib/rays/point.rb CHANGED
@@ -12,23 +12,23 @@ module Rays
12
12
  include Comparable
13
13
  include Enumerable
14
14
 
15
- def move_to (*args)
16
- dup.move_to! *args
15
+ def move_to(*args)
16
+ dup.move_to!(*args)
17
17
  end
18
18
 
19
- def move_by (*args)
20
- dup.move_by! *args
19
+ def move_by(*args)
20
+ dup.move_by!(*args)
21
21
  end
22
22
 
23
- def zero? ()
23
+ def zero?()
24
24
  length == 0
25
25
  end
26
26
 
27
- def each (&block)
28
- to_a.each &block
27
+ def each(&block)
28
+ to_a.each(&block)
29
29
  end
30
30
 
31
- def to_a (dimension = 2)
31
+ def to_a(dimension = 2)
32
32
  case dimension
33
33
  when 1 then [x]
34
34
  when 2 then [x, y]
@@ -37,17 +37,17 @@ module Rays
37
37
  end
38
38
  end
39
39
 
40
- def to_s (dimension = 2)
40
+ def to_s(dimension = 2)
41
41
  to_a(dimension).to_s
42
42
  end
43
43
 
44
- def <=> (o)
44
+ def <=>(o)
45
45
  ret = x <=> o.x; return ret if ret != 0
46
46
  ret = y <=> o.y; return ret if ret != 0
47
47
  z <=> o.z
48
48
  end
49
49
 
50
- def inspect ()
50
+ def inspect()
51
51
  "#<Rays::Point #{to_a(3).join ', '}>"
52
52
  end
53
53
 
data/lib/rays/polygon.rb CHANGED
@@ -12,43 +12,43 @@ module Rays
12
12
 
13
13
  include Enumerable
14
14
 
15
- def initialize (*args, loop: true)
15
+ def initialize(*args, loop: true)
16
16
  setup args, loop
17
17
  end
18
18
 
19
- def transform (matrix = nil, &block)
19
+ def transform(matrix = nil, &block)
20
20
  lines = to_a
21
21
  lines = lines.map {|line| line.transform matrix} if matrix
22
22
  lines = block.call lines if block
23
- self.class.new *lines
23
+ self.class.new(*lines)
24
24
  end
25
25
 
26
- def intersects (obj)
26
+ def intersects(obj)
27
27
  !(self & obj).empty?
28
28
  end
29
29
 
30
- def self.line (*args, loop: false)
31
- new *args, loop: loop
30
+ def self.line(*args, loop: false)
31
+ new(*args, loop: loop)
32
32
  end
33
33
 
34
- def self.rect (
34
+ def self.rect(
35
35
  *args, round: nil, lt: nil, rt: nil, lb: nil, rb: nil, nsegment: nil)
36
36
 
37
37
  create_rect args, round, lt, rt, lb, rb, nsegment
38
38
  end
39
39
 
40
- def self.ellipse (
40
+ def self.ellipse(
41
41
  *args, center: nil, radius: nil, hole: nil, from: nil, to: nil,
42
42
  nsegment: nil)
43
43
 
44
44
  create_ellipse args, center, radius, hole, from, to, nsegment
45
45
  end
46
46
 
47
- def self.curve (*args, loop: false)
47
+ def self.curve(*args, loop: false)
48
48
  create_curve args, loop
49
49
  end
50
50
 
51
- def self.bezier (*args, loop: false)
51
+ def self.bezier(*args, loop: false)
52
52
  create_bezier args, loop
53
53
  end
54
54
 
@@ -12,18 +12,18 @@ module Rays
12
12
 
13
13
  class Line < Polyline
14
14
 
15
- def initialize (*points, loop: true, hole: false)
15
+ def initialize(*points, loop: true, hole: false)
16
16
  setup points, loop, hole
17
17
  end
18
18
 
19
- def transform (matrix = nil, loop: loop?, hole: hole?, &block)
19
+ def transform(matrix = nil, loop: loop?, hole: hole?, &block)
20
20
  points = to_a
21
21
  points = points.map {|point| matrix * point} if matrix
22
22
  points = block.call points if block
23
- self.class.new *points, loop: loop, hole: hole
23
+ self.class.new(*points, loop: loop, hole: hole)
24
24
  end
25
25
 
26
- def inspect ()
26
+ def inspect()
27
27
  "#<Rays::Polygon::Line #{to_a.join ', '}, loop: #{loop?}, hole: #{hole?}>"
28
28
  end
29
29
 
data/lib/rays/polyline.rb CHANGED
@@ -11,18 +11,18 @@ module Rays
11
11
 
12
12
  include Enumerable
13
13
 
14
- def initialize (*points, loop: false)
14
+ def initialize(*points, loop: false)
15
15
  setup points, loop
16
16
  end
17
17
 
18
- def transform (matrix = nil, loop: loop?, &block)
18
+ def transform(matrix = nil, loop: loop?, &block)
19
19
  points = to_a
20
20
  points = points.map {|point| matrix * point} if matrix
21
21
  points = block.call points if block
22
- self.class.new *points, loop: loop
22
+ self.class.new(*points, loop: loop)
23
23
  end
24
24
 
25
- def inspect ()
25
+ def inspect()
26
26
  "#<Rays::Polyline #{to_a.join ', '}, loop: #{loop?}>"
27
27
  end
28
28
 
data/lib/rays/shader.rb CHANGED
@@ -10,16 +10,16 @@ module Rays
10
10
 
11
11
  class Shader
12
12
 
13
- def initialize (source = nil, **uniforms, &block)
13
+ def initialize(source = nil, **uniforms, &block)
14
14
  if source
15
15
  setup source
16
- uniform **uniforms unless uniforms.empty?
16
+ uniform(**uniforms) unless uniforms.empty?
17
17
  end
18
18
 
19
19
  Xot::BlockUtil.instance_eval_or_block_call self, &block if block
20
20
  end
21
21
 
22
- def uniform (name = nil, *args, **uniforms)
22
+ def uniform(name = nil, *args, **uniforms)
23
23
  set_uniform name, *args if name
24
24
  uniforms.each do |key, value|
25
25
  set_uniform key, value
data/rays.gemspec CHANGED
@@ -28,8 +28,8 @@ Gem::Specification.new do |s|
28
28
  s.platform = Gem::Platform::RUBY
29
29
  s.required_ruby_version = '~> 2'
30
30
 
31
- s.add_runtime_dependency 'xot', '~> 0.1.21'
32
- s.add_runtime_dependency 'rucy', '~> 0.1.21'
31
+ s.add_runtime_dependency 'xot', '~> 0.1.22'
32
+ s.add_runtime_dependency 'rucy', '~> 0.1.22'
33
33
 
34
34
  s.files = `git ls-files`.split $/
35
35
  s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
data/test/helper.rb CHANGED
@@ -12,6 +12,6 @@ require 'rays'
12
12
  include Xot::Test
13
13
 
14
14
 
15
- unless $RAYS_NOAUTOINIT
16
- def Rays.fin! () end
15
+ unless defined?($RAYS_NOAUTOINIT) && $RAYS_NOAUTOINIT
16
+ def Rays.fin!() end
17
17
  end
data/test/test_bitmap.rb CHANGED
@@ -9,20 +9,20 @@ class TestBitmap < Test::Unit::TestCase
9
9
  W = 32
10
10
  H = 16
11
11
 
12
- def bitmap (w = W, h = H)
12
+ def bitmap(w = W, h = H)
13
13
  Rays::Bitmap.new w, h
14
14
  end
15
15
 
16
- def color (*args)
17
- Rays::Color.new *args
16
+ def color(*args)
17
+ Rays::Color.new(*args)
18
18
  end
19
19
 
20
- def test_initialize ()
20
+ def test_initialize()
21
21
  assert_equal W, bitmap.width
22
22
  assert_equal H, bitmap.height
23
23
  end
24
24
 
25
- def test_dup ()
25
+ def test_dup()
26
26
  o = bitmap
27
27
  assert_equal color(0, 0, 0, 0), o[0, 0]
28
28
  o[0, 0] = color(1, 0, 0, 0)
@@ -34,14 +34,14 @@ class TestBitmap < Test::Unit::TestCase
34
34
  assert_equal color(1, 0, 0, 0), o[0, 0]
35
35
  end
36
36
 
37
- def test_at ()
37
+ def test_at()
38
38
  o = bitmap
39
39
  assert_equal color(0, 0, 0, 0), o[0, 0]
40
40
  o[0, 0] = 1
41
41
  assert_equal color(1, 1, 1, 1), o[0, 0]
42
42
  end
43
43
 
44
- def test_to_a ()
44
+ def test_to_a()
45
45
  colors = %w[#f00 #0f0 #00f #ff0].map {|s| color s}
46
46
  bmp = bitmap 2, 2
47
47
  bmp[0, 0], bmp[1, 0], bmp[0, 1], bmp[1, 1] = colors
data/test/test_bounds.rb CHANGED
@@ -6,15 +6,15 @@ require_relative 'helper'
6
6
 
7
7
  class TestBounds < Test::Unit::TestCase
8
8
 
9
- def bounds (*args)
10
- Rays::Bounds.new *args
9
+ def bounds(*args)
10
+ Rays::Bounds.new(*args)
11
11
  end
12
12
 
13
- def point (*args)
14
- Rays::Point.new *args
13
+ def point(*args)
14
+ Rays::Point.new(*args)
15
15
  end
16
16
 
17
- def test_initialize ()
17
+ def test_initialize()
18
18
  assert_equal bounds(0, 0, 0, 0, 0, 0), bounds()
19
19
  assert_equal bounds(0, 0, 0, 1, 1, 0), bounds(1)
20
20
  assert_equal bounds(0, 0, 0, 1, 2, 0), bounds(1, 2)
@@ -25,7 +25,7 @@ class TestBounds < Test::Unit::TestCase
25
25
  assert_raise(ArgumentError) {bounds(1, 2, 3, 4, 5, 6, 7)}
26
26
  end
27
27
 
28
- def test_dup ()
28
+ def test_dup()
29
29
  o = bounds
30
30
  assert_equal bounds(0, 0, 0, 0, 0, 0), o
31
31
  o.x = 1
@@ -37,17 +37,17 @@ class TestBounds < Test::Unit::TestCase
37
37
  assert_equal bounds(1, 0, 0, 0, 0, 0), o
38
38
  end
39
39
 
40
- def test_intersect? ()
40
+ def test_intersect?()
41
41
  assert bounds(10, 20, 30, 100, 100, 100).intersect?(bounds 50, 60, 70, 100, 100, 100)
42
42
  assert_not bounds(10, 20, 30, 10, 10, 10).intersect?(bounds 50, 60, 70, 100, 100, 100)
43
43
  end
44
44
 
45
- def test_include? ()
45
+ def test_include?()
46
46
  assert bounds(10, 20, 30, 100, 100, 100).include?(point 50, 60)
47
47
  assert_not bounds(10, 20, 30, 10, 10, 10).include?(point 50, 60)
48
48
  end
49
49
 
50
- def test_valid? ()
50
+ def test_valid?()
51
51
  assert bounds(0, 0, 0, 0, 0, 0).valid?
52
52
  assert bounds(0, 0, 0, 1, 0, 0).valid?
53
53
  assert bounds(0, 0, 0, 0, 1, 0).valid?
@@ -57,7 +57,7 @@ class TestBounds < Test::Unit::TestCase
57
57
  assert_not bounds(0, 0, 0, 0, 0, -1).valid?
58
58
  end
59
59
 
60
- def test_get_xyzwhd ()
60
+ def test_get_xyzwhd()
61
61
  o = bounds 1, 2, 3, 4, 5, 6
62
62
  assert_equal 1, o.x
63
63
  assert_equal 2, o.y
@@ -70,7 +70,7 @@ class TestBounds < Test::Unit::TestCase
70
70
  assert_equal 6, o.depth
71
71
  end
72
72
 
73
- def test_set_xyzwhd ()
73
+ def test_set_xyzwhd()
74
74
  o = bounds
75
75
  o.x = 1
76
76
  assert_equal [1, 0, 0, 0, 0, 0], o.to_a(3)
@@ -92,7 +92,7 @@ class TestBounds < Test::Unit::TestCase
92
92
  assert_equal [1, 2, 3, 7, 8, 9], o.to_a(3)
93
93
  end
94
94
 
95
- def test_get_ltbrbf ()
95
+ def test_get_ltbrbf()
96
96
  o = bounds 1, 2, 3, 4, 5, 6
97
97
  assert_equal 1, o.left
98
98
  assert_equal 2, o.top
@@ -106,7 +106,7 @@ class TestBounds < Test::Unit::TestCase
106
106
  assert_equal [4, 6], o.rb.to_a
107
107
  end
108
108
 
109
- def test_set_ltbrbf ()
109
+ def test_set_ltbrbf()
110
110
  assert_equal [1, 0, 0, -1, 0, 0], bounds.tap {|o| o.left = 1}.to_a(3)
111
111
  assert_equal [0, 2, 0, 0, -2, 0], bounds.tap {|o| o.top = 2}.to_a(3)
112
112
  assert_equal [0, 0, 3, 0, 0, -3], bounds.tap {|o| o.back = 3}.to_a(3)
@@ -132,7 +132,7 @@ class TestBounds < Test::Unit::TestCase
132
132
  assert_equal [10, 20, 0, 40, 50, 0], bounds(10, 20, 30, 40).tap {|o| o.rb += 10}.to_a(3)
133
133
  end
134
134
 
135
- def test_position ()
135
+ def test_position()
136
136
  o = bounds 1, 2, 3, 4, 5, 6
137
137
  assert_equal [ 1, 2, 3], o.position.to_a(3)
138
138
  o.position = point 7, 8, 9
@@ -142,14 +142,14 @@ class TestBounds < Test::Unit::TestCase
142
142
  assert_equal [10, 11, 12], o.pos.to_a(3)
143
143
  end
144
144
 
145
- def test_size ()
145
+ def test_size()
146
146
  o = bounds 1, 2, 3, 4, 5, 6
147
147
  assert_equal point(4, 5, 6), o.size
148
148
  o.size = point 7, 8, 9
149
149
  assert_equal point(7, 8, 9), o.size
150
150
  end
151
151
 
152
- def test_move_to ()
152
+ def test_move_to()
153
153
  o = bounds 1, 2, 3, 4, 5, 6
154
154
  assert_equal bounds(7, 2, 3, 4, 5, 6), o.move_to( 7)
155
155
  assert_equal bounds(7, 8, 3, 4, 5, 6), o.move_to( 7, 8)
@@ -169,7 +169,7 @@ class TestBounds < Test::Unit::TestCase
169
169
  assert_equal bounds( 7, 8, 9, 4, 5, 6), o1
170
170
  end
171
171
 
172
- def test_move_by ()
172
+ def test_move_by()
173
173
  o = bounds 1, 2, 3, 4, 5, 6
174
174
  assert_equal bounds( 8, 2, 3, 4, 5, 6), o.move_by( 7)
175
175
  assert_equal bounds( 8, 10, 3, 4, 5, 6), o.move_by( 7, 8)
@@ -192,7 +192,7 @@ class TestBounds < Test::Unit::TestCase
192
192
  assert_equal bounds( 8, 10, 12, 4, 5, 6), o1
193
193
  end
194
194
 
195
- def test_resize_to ()
195
+ def test_resize_to()
196
196
  o = bounds 1, 2, 3, 4, 5, 6
197
197
  assert_equal bounds(1, 2, 3, 7, 5, 6), o.resize_to( 7)
198
198
  assert_equal bounds(1, 2, 3, 7, 8, 6), o.resize_to( 7, 8)
@@ -212,7 +212,7 @@ class TestBounds < Test::Unit::TestCase
212
212
  assert_equal bounds(1, 2, 3, 7, 8, 9), o1
213
213
  end
214
214
 
215
- def test_resize_by ()
215
+ def test_resize_by()
216
216
  o = bounds 1, 2, 3, 4, 5, 6
217
217
  assert_equal bounds(1, 2, 3, 11, 5, 6), o.resize_by( 7)
218
218
  assert_equal bounds(1, 2, 3, 11, 13, 6), o.resize_by( 7, 8)
@@ -235,7 +235,7 @@ class TestBounds < Test::Unit::TestCase
235
235
  assert_equal bounds(1, 2, 3, 11, 13, 15), o1
236
236
  end
237
237
 
238
- def test_inset_by ()
238
+ def test_inset_by()
239
239
  o = bounds 1, 2, 3, 20, 30, 40
240
240
  assert_equal bounds(8, 2, 3, 6, 30, 40), o.inset_by( 7)
241
241
  assert_equal bounds(8, 10, 3, 6, 14, 40), o.inset_by( 7, 8)
@@ -255,7 +255,7 @@ class TestBounds < Test::Unit::TestCase
255
255
  assert_equal bounds( 8, 10, 12, 6, 14, 22), o1
256
256
  end
257
257
 
258
- def test_to_a ()
258
+ def test_to_a()
259
259
  o = bounds 1, 2, 3, 4, 5, 6
260
260
  assert_equal [1, 2, 4, 5], o.to_a
261
261
  assert_equal [1, 4], o.to_a(1)
@@ -266,7 +266,7 @@ class TestBounds < Test::Unit::TestCase
266
266
  assert_raise(ArgumentError) {o.to_a(4)}
267
267
  end
268
268
 
269
- def test_index ()
269
+ def test_index()
270
270
  o = bounds 1, 2, 3, 4, 5, 6
271
271
  assert_equal point(1, 2, 3), o[0]
272
272
  assert_equal point(4, 5, 6), o[1]
@@ -274,7 +274,7 @@ class TestBounds < Test::Unit::TestCase
274
274
  assert_raise(IndexError) {o[2]}
275
275
  end
276
276
 
277
- def test_index_assign ()
277
+ def test_index_assign()
278
278
  o = bounds 1, 2, 3, 4, 5, 6
279
279
  o[0] = point 7, 8, 9
280
280
  assert_equal bounds(7, 8, 9, 4, 5, 6), o
@@ -284,7 +284,7 @@ class TestBounds < Test::Unit::TestCase
284
284
  assert_raise(IndexError) {o[2]}
285
285
  end
286
286
 
287
- def test_compare ()
287
+ def test_compare()
288
288
  o = bounds 1, 2, 3, 4, 5, 6
289
289
  assert o == bounds(1, 2, 3, 4, 5, 6)
290
290
  assert_not o != bounds(1, 2, 3, 4, 5, 6)
@@ -304,7 +304,7 @@ class TestBounds < Test::Unit::TestCase
304
304
  assert o > bounds(1, 2, 3, 4, 5, 5)
305
305
  end
306
306
 
307
- def test_operators ()
307
+ def test_operators()
308
308
  assert_equal bounds(50, 60, 70, 60, 60, 60), bounds(10, 20, 30, 100, 100, 100) & bounds(50, 60, 70, 100, 100, 100)
309
309
  assert_equal bounds(10, 20, 30, 140, 140, 140), bounds(10, 20, 30, 100, 100, 100) | bounds(50, 60, 70, 100, 100, 100)
310
310
  assert_equal bounds(10, 20, 30, 20, 20, 20), bounds(20, 30, 40, 10, 10, 10) | point(10, 20, 30)
@@ -313,7 +313,7 @@ class TestBounds < Test::Unit::TestCase
313
313
  assert_equal point(0), (bounds(10, 20, 30, 10, 10, 10) & bounds(50, 60, 70, 10, 10, 10)).size
314
314
  end
315
315
 
316
- def test_invalid ()
316
+ def test_invalid()
317
317
  o = Rays::Bounds.invalid
318
318
  assert_not o.valid?
319
319
 
data/test/test_color.rb CHANGED
@@ -6,19 +6,19 @@ require_relative 'helper'
6
6
 
7
7
  class TestColor < Test::Unit::TestCase
8
8
 
9
- def color (*args)
10
- Rays::Color.new *args
9
+ def color(*args)
10
+ Rays::Color.new(*args)
11
11
  end
12
12
 
13
- def color8 (r, g, b, a = 255, div = 255)
14
- color *[r, g, b, a].map {|n| n / div.to_f}
13
+ def color8(r, g, b, a = 255, div = 255)
14
+ color(*[r, g, b, a].map {|n| n / div.to_f})
15
15
  end
16
16
 
17
- def hsv (*args)
18
- Rays::Color.hsv *args
17
+ def hsv(*args)
18
+ Rays::Color.hsv(*args)
19
19
  end
20
20
 
21
- def test_initialize ()
21
+ def test_initialize()
22
22
  assert_equal color(0, 0, 0, 1), color()
23
23
  assert_equal color(1, 1, 1, 1), color(1)
24
24
  assert_equal color(1, 1, 1, 2), color(1, 2)
@@ -28,7 +28,7 @@ class TestColor < Test::Unit::TestCase
28
28
  assert_raise(ArgumentError) {color(1, 2, 3, 4, 5)}
29
29
  end
30
30
 
31
- def test_initialize_with_string ()
31
+ def test_initialize_with_string()
32
32
  assert_equal color(0, 0, 0, 1), color('#000')
33
33
  assert_equal color(0, 0, 0, 1), color('#000000')
34
34
  assert_equal color(0, 0, 0, 0), color('#0000')
@@ -46,7 +46,7 @@ class TestColor < Test::Unit::TestCase
46
46
  assert_raise(ArgumentError) {color '#0000000'}
47
47
  end
48
48
 
49
- def test_dup ()
49
+ def test_dup()
50
50
  o = color
51
51
  assert_equal color(0, 0, 0), o
52
52
  o.red = 1
@@ -58,7 +58,7 @@ class TestColor < Test::Unit::TestCase
58
58
  assert_equal color(1, 0, 0), o
59
59
  end
60
60
 
61
- def test_get_rgb ()
61
+ def test_get_rgb()
62
62
  o = color 1, 2, 3, 4
63
63
  assert_equal 1, o.red
64
64
  assert_equal 2, o.green
@@ -66,7 +66,7 @@ class TestColor < Test::Unit::TestCase
66
66
  assert_equal 4, o.alpha
67
67
  end
68
68
 
69
- def test_set_rgb ()
69
+ def test_set_rgb()
70
70
  o = color
71
71
  assert_equal [0, 0, 0, 1], o.to_a
72
72
  o.red = 1
@@ -79,12 +79,12 @@ class TestColor < Test::Unit::TestCase
79
79
  assert_equal [1, 2, 3, 4], o.to_a
80
80
  end
81
81
 
82
- def test_to_a ()
82
+ def test_to_a()
83
83
  o = color 1, 2, 3, 4
84
84
  assert_equal [1, 2, 3, 4], o.to_a
85
85
  end
86
86
 
87
- def test_index ()
87
+ def test_index()
88
88
  o = color 1, 2, 3, 4
89
89
  assert_equal 1, o[0]
90
90
  assert_equal 2, o[1]
@@ -94,7 +94,7 @@ class TestColor < Test::Unit::TestCase
94
94
  assert_raise(IndexError) {color[4]}
95
95
  end
96
96
 
97
- def test_index_assign ()
97
+ def test_index_assign()
98
98
  o = color 1, 2, 3, 4
99
99
  o[0] = 4
100
100
  assert_equal [4, 2, 3, 4], o.to_a
@@ -108,7 +108,7 @@ class TestColor < Test::Unit::TestCase
108
108
  assert_raise(IndexError) {color[ 4] = 8}
109
109
  end
110
110
 
111
- def test_compare ()
111
+ def test_compare()
112
112
  o = color 1, 2, 3, 4
113
113
  assert o == color(1, 2, 3, 4)
114
114
  assert_not o != color(1, 2, 3, 4)
@@ -124,7 +124,7 @@ class TestColor < Test::Unit::TestCase
124
124
  assert o > color(1, 2, 3, 3)
125
125
  end
126
126
 
127
- def test_hsv_hue ()
127
+ def test_hsv_hue()
128
128
  assert_equal color(0.5, 0, 1), hsv(-0.25, 1, 1)
129
129
  assert_equal color(1, 0, 0), hsv( 0, 1, 1)
130
130
  assert_equal color(0.5, 1, 0), hsv( 0.25, 1, 1)
@@ -134,19 +134,19 @@ class TestColor < Test::Unit::TestCase
134
134
  assert_equal color(0.5, 1, 0), hsv( 1.25, 1, 1)
135
135
  end
136
136
 
137
- def test_hsv_saturation ()
137
+ def test_hsv_saturation()
138
138
  assert_equal color(1, 1, 1), hsv(1, 0, 1)
139
139
  assert_equal color(1, 0.5, 0.5), hsv(1, 0.5, 1)
140
140
  assert_equal color(1, 0, 0), hsv(1, 1, 1)
141
141
  end
142
142
 
143
- def test_hsv_value ()
143
+ def test_hsv_value()
144
144
  assert_equal color(0, 0, 0), hsv(1, 1, 0)
145
145
  assert_equal color(0.5, 0, 0), hsv(1, 1, 0.5)
146
146
  assert_equal color(1, 0, 0), hsv(1, 1, 1)
147
147
  end
148
148
 
149
- def test_hsv_alpha ()
149
+ def test_hsv_alpha()
150
150
  assert_equal color(1, 0, 0, 0), hsv(1, 1, 1, 0)
151
151
  assert_equal color(1, 0, 0, 0.5), hsv(1, 1, 1, 0.5)
152
152
  assert_equal color(1, 0, 0, 1), hsv(1, 1, 1, 1)