Class: SignedTransform

Inherits:
Transform show all
Defined in:
lib/transform.rb

Instance Attribute Summary

Attributes inherited from Transform

#origin, #scale

Instance Method Summary collapse

Methods inherited from Transform

#initialize, #signed, #unapply

Constructor Details

This class inherits a constructor from Transform

Instance Method Details

#apply(p) ⇒ Object



22
23
24
# File 'lib/transform.rb', line 22

def apply(p)
	{ :x => @origin[:x] + p[:x] * (@scale[:x]<=>0.0).to_i, :y => @origin[:y] + p[:y] * (@scale[:y]<=>0.0).to_i}
end