lua-users home
lua-l archive

Re: Suggestion: math.between()

[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
Now, a case for math.sum could be made in order to avoid select, just as
there is math.min and math.max.

AltStyle によって変換されたページ (->オリジナル) /