Object
# File irb/easter-egg.rb, line 32 def initialize((h, w)) @data = (0..h-2).map { [0] * w } @scale = [w / 2.0, h-2].min @center = Complex(w / 2, h-2) end
# File irb/easter-egg.rb, line 38 def line((x1, y1), (x2, y2)) p1 = Complex(x1, y1) / 2 * @scale + @center p2 = Complex(x2, y2) / 2 * @scale + @center line0(p1, p2) end
This page was generated for Ruby 2.4.0
Ruby-doc.org is provided by James Britt and Neurogami. Hack your world. Feed your head. Live curious.
Generated with Ruby-doc Rdoc Generator 0.44.2.