Average (Arraylist function)

From m204wiki
Revision as of 16:51, 10 July 2012 by JAL2 (talk | contribs)
Jump to navigation Jump to search

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

%averagenumber
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

See also