Method: Hitimes::Stats#mean
- Defined in:
- lib/hitimes/stats.rb
#mean ⇒ Object
call-seq:
stat.mean -> Float
Return the arithmetic mean of the values put into the Stats object. If no values have passed through the stats object then 0.0 is returned;
71 72 73 74 75 |
# File 'lib/hitimes/stats.rb', line 71 def mean return 0.0 if @count.zero? @sum / @count end |