Sha256: 37db55f433e76b039c8d63efe2e1b903068e195b4a0973a737df04910e8926c2

Contents?: true

Size: 219 Bytes

Versions: 54

Compression:

Stored size: 219 Bytes

Contents

class NSNumber

  ##|
  ##|  MISC
  ##|

  # Uses the screen scale to determine how many pixels (converts "pixels" to
  # "points")
  def pixels
    self.to_f / UIScreen.mainScreen.scale
  end
  alias pixel pixels

end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
sugarcube-2.4.2 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.4.1 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.4.0 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.3.0 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.2.0 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.1.5 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.1.4 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.1.3 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.1.2 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.1.1 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.1.0 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.0.2 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.0.1 lib/ios/sugarcube-numbers/nsnumber.rb
sugarcube-2.0.0 lib/ios/sugarcube-numbers/nsnumber.rb