class Percent

Calculates the relative % change between two numbers

Public Class Methods

change(a, b) click to toggle source
# File lib/percent_change.rb, line 3
def self.change(a, b)
  ((b - a) / a.abs) * 100
end