lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


function math.mean(...)
  local argc=select("#",...)
  local total=0
  for i=1,argc do
    total=total+(select(i,...))
  end
  return total/argc
end

 - Jeff