lib/powercore/array.rb
# Returns the percentile value for a given percentage.
Returns the percentile value for a given percentage.
Returns the percentile value for a given percentage .
def percentile(percentage)
    size = self.size
    if size > 1
      index = size * percentage / 100.0
      self.sort[index]
    else
      self.first
    end
  end
def percentile ( percentage ) size = self . size if size > 1 index = size * percentage / 100.0 self . sort [ index ] else self . first end end
Returns the percentile value for a given percentage.
Returns the percentile value for a given percentage .
percentage
<not_specific>