Sha256: f0d9a8bb1467bf32859e4a3f364726873b81aacdbbe34a6fa1e82325dc92efca

Contents?: true

Size: 513 Bytes

Versions: 3

Compression:

Stored size: 513 Bytes

Contents

class CGPoint

  def to_opengl_coordinates

    Joybox.director.convertToGL(self)
  end

  def to_uikit_coordinates

    CGPointMake(self.x.from_pixels, self.y.from_pixels)
  end


  def to_pixel_coordinates

    CGPointMake(self.x.to_pixels, self.y.to_pixels)
  end


  def == (point)

    point.is_a?(CGPoint) && CGPointEqualToPoint(self, point)
  end 


  def + (point)

    CGPointMake(self.x + point.x, self.y + point.y)
  end


  def - (point)

    CGPointMake(self.x - point.x, self.y - point.y)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
joybox-0.0.5 lib/joybox/cocos2d/common/cg_point.rb
joybox-0.0.4 lib/joybox/cocos2d/common/cg_point.rb
joybox-0.0.3 lib/joybox/cocos2d/common/cg_point.rb