Methods

Files

MathArray

Public Instance Methods

mean() click to toggle source
# File lib/sugar-high/array.rb, line 125
def mean
 (size > 0) ? sum.to_f / size : 0
end
sum() click to toggle source
# File lib/sugar-high/array.rb, line 121
def sum
 inject( 0 ) { |sum,x| sum + x }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.