Skip to content

Conversation

@The808Error
Copy link
Contributor

Basically just takes any number of arguments and returns the number average of them.

@thegrb93
Copy link
Owner

I don't think varargs is a good input for this. Should be table instead. also would rename to math.mean

@The808Error
Copy link
Contributor Author

The808Error commented Dec 31, 2025

I did varargs to keep it consistent with math.max and math.min. If people want to use tables, then they can just use unpack().

@thegrb93
Copy link
Owner

I did varargs to keep it consistent with math.max and math.min. If people want to use tables, then they can just use unpack().

unpack so that the function has to pack it back into table. I don't like it. Min and Max weren't designed to be used on data sets, so I think the consistency isn't needed.

@The808Error
Copy link
Contributor Author

fair

@thegrb93 thegrb93 merged commit 4a84517 into thegrb93:master Jan 2, 2026
1 check passed
github-actions bot added a commit that referenced this pull request Jan 2, 2026
* Update math.lua

* Update math.lua 4a84517
@The808Error The808Error deleted the math-averager-pray branch January 5, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants