Average (Arraylist function)
Average the members of this ArrayList (Arraylist class)
[Introduced in Sirius Mods 7.8]
This page is under construction.
Syntax
%average = al:Average[( [itemFunction])]
Syntax terms
%average | number |
---|---|
al | Arraylist object |
method | ItemFunction object |
Usage notes
Examples
b %al is arrayList of float %al = new %al:add(5) %al:add(3) %al:add(8) print %al:average end
The result is:
5.33333333333333