diff options
Diffstat (limited to 'sample/rcs.rb')
-rw-r--r-- | sample/rcs.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sample/rcs.rb b/sample/rcs.rb index 6d7f10c6bc..0ed4a36c1e 100644 --- a/sample/rcs.rb +++ b/sample/rcs.rb @@ -14,12 +14,16 @@ while gets() while xr < hdw x = xr * (1 + y) - y * w / 2 i = (x / (1 + h) + sw /2) - c = if (1 < i && i < $_.length); $_[i, 1].to_i else 0 end + if (1 < i && i < $_.length); + c = $_[i, 1].to_i + else + c = 0 + end y = h - d * c xl = xr - w * y / (1 + y); if xl < -hdw || xl >= hdw || xl <= maxxl - t = rand(ss.length) - c = ss[t, 1] + tt = rand(ss.length) + c = ss[tt, 1] else c = s[xl + hdw, 1] maxxl = xl |