Average (Arraylist function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Automatically generated page update)
 
mNo edit summary
Line 2: Line 2:


This page is [[under construction]].
This page is [[under construction]].
==Syntax==
==Syntax==
{{Template:Arraylist:Average syntax}}
{{Template:Arraylist:Average syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
Line 12: Line 14:
<td><var>ItemFunction</var> object</td></tr>
<td><var>ItemFunction</var> object</td></tr>
</table>
</table>
==Usage notes==
==Usage notes==
==Examples==
==Examples==
<p class="code">b
%al is arrayList of float
%al = new
%al:add(5)
%al:add(3)
%al:add(8)
print %al:average
end
</p>
The result is:
<p class="output">5.33333333333333
</p>
==See also==
==See also==
{{Template:Arraylist:Average footer}}
{{Template:Arraylist:Average footer}}

Revision as of 16:51, 10 July 2012

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