Sha256: eaa5316f06d1ec05f1c8f96e174bc9196aac56c35fa37ac10c297db2d122edc7

Contents?: true

Size: 109 Bytes

Versions: 20

Compression:

Stored size: 109 Bytes

Contents

class Numeric
  def percent_of(n)
    return Float::INFINITY if n == 0
    (to_f / n.to_f) * 100.0
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
darthjee-core_ext-1.5.6 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.5.5 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.5.4 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.5.3 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.5.2 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.5.1 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.5.0 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.4.1 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.4.0 lib/darthjee/core_ext/numeric.rb
darthjee-core_ext-1.3.1 lib/numeric.rb
darthjee-core_ext-1.3.0 lib/numeric.rb
darthjee-core_ext-1.2.6 lib/numeric.rb
bidu-core_ext-1.2.5 lib/numeric.rb
bidu-core_ext-1.2.4 lib/numeric.rb
bidu-core_ext-1.2.3 lib/numeric.rb
bidu-core_ext-1.2.2 lib/numeric.rb
bidu-core_ext-1.2.1 lib/numeric.rb
bidu-core_ext-1.2.0 lib/numeric.rb
bidu-core_ext-1.1.1 lib/numeric.rb
bidu-core_ext-1.0.0 lib/numeric.rb