termular 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,8 @@ Termular::Console.init
10
10
  ui = Termular::UI.new
11
11
  ui.render
12
12
 
13
+ trap("WINCH") { Ncurses.endwin; Ncurses.refresh; ui.tick }
14
+
13
15
  loop do
14
16
  c = nil
15
17
  if ui.needs_tick?
@@ -139,7 +139,7 @@ module Termular
139
139
  (options["tmin"] || 0).upto(((options["tmax"] || 2 * Math::PI) * 100).round).map { |t| t / 100.0 }.each do |theta|
140
140
  ctx["t"] = theta
141
141
  radius = expression.eval ctx
142
- next if radius.is_a? Complex or (radius.responds_to? :nan and radius.nan?)
142
+ next if radius.is_a? Complex or (radius.respond_to? :nan and radius.nan?)
143
143
  scr_pt = point_to_screen(radius*Math.cos(theta), radius*Math.sin(theta))
144
144
  if scr_pt[0] >= 0 and scr_pt[0] <= Console.cols and scr_pt[1] >= 0 and scr_pt[1] <= Console.rows
145
145
  buff << Console.move(scr_pt[0], scr_pt[1])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: termular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ncurses-ruby
16
- requirement: &2151895520 !ruby/object:Gem::Requirement
16
+ requirement: &2154884800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2151895520
24
+ version_requirements: *2154884800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: paint
27
- requirement: &2151894800 !ruby/object:Gem::Requirement
27
+ requirement: &2154883580 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2151894800
35
+ version_requirements: *2154883580
36
36
  description: Termular Grapher is a simple graphing program that's capable of cartesian
37
37
  and polar graphs
38
38
  email: