Sha256: 23a508d8ea967d0ba9f01f89b62fbc83c046b4a13e37f8f9632b2b07c1123c8e

Contents?: true

Size: 362 Bytes

Versions: 24

Compression:

Stored size: 362 Bytes

Contents

module Rubyvis
  def self.Transform
    Rubyvis::Transform
  end
  class Transform
    attr_accessor :k,:x,:y
    def initialize
      @k=1
      @x=0
      @y=0
    end
    def translate(x,y)
      v=Transform.new
      v.k=self.k
      v.x=self.k*x+self.x
      v.y=self.k*y+self.y
      v

    end
    def self.identity
      Transform.new
    end
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rubyvis-0.7.0 lib/rubyvis/transform.rb
rubyvis-0.6.1 lib/rubyvis/transform.rb
rubyvis-0.6.0 lib/rubyvis/transform.rb
rubyvis-0.5.2 lib/rubyvis/transform.rb
rubyvis-0.5.1 lib/rubyvis/transform.rb
rubyvis-0.5.0 lib/rubyvis/transform.rb
rubyvis-0.4.1 lib/rubyvis/transform.rb
rubyvis-0.4.0 lib/rubyvis/transform.rb
rubyvis-0.3.6 lib/rubyvis/transform.rb
rubyvis-0.3.5 lib/rubyvis/transform.rb
rubyvis-0.3.4 lib/rubyvis/transform.rb
rubyvis-0.3.3 lib/rubyvis/transform.rb
rubyvis-0.3.2 lib/rubyvis/transform.rb
rubyvis-0.3.1 lib/rubyvis/transform.rb
rubyvis-0.3.0 lib/rubyvis/transform.rb
rubyvis-0.2.2 lib/rubyvis/transform.rb
rubyvis-0.2.1 lib/rubyvis/transform.rb
rubyvis-0.2.0 lib/rubyvis/transform.rb
rubyvis-0.1.7 lib/rubyvis/transform.rb
rubyvis-0.1.6 lib/rubyvis/transform.rb