Sha256: c902e0fab73d74d543b272b8d9c700a1cec5fff7fe4bd5eef29cb3914c52b035

Contents?: true

Size: 239 Bytes

Versions: 2

Compression:

Stored size: 239 Bytes

Contents

class NSArray

  def to_point
    CGPointMake(self[0], self[1]) if size == 2
  end

  def to_size
    CGSizeMake(self[0], self[1]) if size == 2
  end

  def to_rect
    CGRectMake(self[0], self[1], self[2], self[3]) if size == 4
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
joybox-1.1.1 motion/joybox/common/ns_array.rb
joybox-1.1.0 motion/joybox/common/ns_array.rb