HomeWildfire Games

Vector cleanup.


Vector cleanup.

Improve some of the comments mentioned by fatherbushido in rP20428.
Rename avg to average and test it.
Inline constructor defaults.
Don't use array functions nor for...of loops here to maximize the performance, refs rP14693.

Event Timeline

Ran a test when I wrote this on Nov 15:

list of size 4, 100000000 sum operations

for 3623
reduce 6011
for..of 23713

(Likely I milliseconds, but the unit doesn't matter as long as all have the same)

no difference between let/var (each variant was faster one or another time)