Operator Type:
Operator Scope of Action:
Operator Purpose:
Operator First Added:
Operator Altered:
Function [other Function type actions]
List [operators of similar scope]
Dictionary, Set & List operations [other Dictionary, Set & List operations operators]
9.0.0
List/set.avg
Returns the mean value of a list or set of numbers. For example, if MyList is a list of numerical values '3;4;8;3;9;2;12':
$MyNumber = $MyList.avg;
returns 5.85714
To get only two decimal places:
$MyNumber = $MyList.avg.format("2");
returns 5.86