lib/geomotion/cg_rect.rb in geomotion-0.10.0 vs lib/geomotion/cg_rect.rb in geomotion-0.12.1

- old
+ new

@@ -7,18 +7,18 @@ # point = CGPoint.make(x: 10, y: 30) # size = CGSize.make(width: 100, height: 20) # CGRect.make(origin: point, size: size) def self.make(options = {}) if options[:origin] - x = options[:origin].x - y = options[:origin].y + x = options[:origin][0] + y = options[:origin][1] else x = options[:x] || 0 y = options[:y] || 0 end if options[:size] - w = options[:size].width - h = options[:size].height + w = options[:size][0] + h = options[:size][1] else w = options[:width] || 0 h = options[:height] || 0 end self.new([x, y], [w, h])