[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Suggestion: math.between()
- From: Stefan <stefan@...>
- Date: Tue, 22 Jun 2010 12:52:02 -0700
-- Average function using arithmetic mean
-- (using proposed math.sum function)
return math.sum(...) / select("#",...)
On a side note, I find it vaguely disappointing how many (too quick)
responses to the original post were utterly wrong given the sample
results. I know (hope?) we all could do better given some real effort.
This seems to be a bit of a trend lately - of shooting from the hip with
solution/sample code. Perhaps we should be less quick to respond and
more careful with such responses?
On 6/21/2010 5:15 PM, Luiz Henrique de Figueiredo wrote:
for i=1,argc do
Now, a case for math.sum could be made in order to avoid select, just as
there is math.min and math.max.