Sha256: ec2cd8c85866dfd99121568bb6ff9ac29fdbc0f385a4ef828308cf5f29c1117f

Contents?: true

Size: 187 Bytes

Versions: 13

Compression:

Stored size: 187 Bytes

Contents

module MetricFu
  module Calculate
    module_function

    def integer_percent(num, total)
      return 0 if total.zero?
      (Float(num) / Float(total) * 100).round
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
metric_fu-4.11.3 lib/metric_fu/calculate.rb
metric_fu-4.11.2 lib/metric_fu/calculate.rb
metric_fu-4.11.1 lib/metric_fu/calculate.rb
metric_fu-4.11.0 lib/metric_fu/calculate.rb
metric_fu-4.10.0 lib/metric_fu/calculate.rb
metric_fu-4.9.0 lib/metric_fu/calculate.rb
metric_fu-4.8.0 lib/metric_fu/calculate.rb
metric_fu-4.7.4 lib/metric_fu/calculate.rb
metric_fu-4.7.3 lib/metric_fu/calculate.rb
metric_fu-4.7.2 lib/metric_fu/calculate.rb
metric_fu-4.7.1 lib/metric_fu/calculate.rb
metric_fu-4.7.0 lib/metric_fu/calculate.rb
metric_fu-4.6.0 lib/metric_fu/calculate.rb