| Syntax |
|
| Documentation | Calculates the average value of all given parameters:
|
| Examples | |
Calculate the average value of all numbers in range of 1 through 10:
Alternative impementation using $add and $divide:
$set{sum}{0} $for {$set{counter}{1}} {$lessOrEqual{$get{counter}}{$get{length}}} {$incLocal{counter}}
$set{sum}{$add{$get{sum}}{$get{counter}}} } $set{average}{$divide{$get{sum}}{$get{length}}} |
|
| Group | Math |
| Minimum required transaction-mode: | NONE |
| Required scripting permission of the developer | PERMISSION_FL_BASIC |
| Minimum parameters | 2 |
| Maximum parameters | <unlimited> |