float llListStatistics(integer operation, list input)
This
function allows a
script to perform a statistical
operation as defined by
operation on a
list composed of integers and
floats.
This function
returns a float, so using
llRound,
llCeil, or
llFloor might be more desirable in order to provide a cleaner output from this function.
| Statistical Operation | Effect |
| LIST_STAT_MAX | Retrieves the largest number. |
| LIST_STAT_MIN | Retrieves the smallest number. |
| LIST_STAT_MEAN | Retrieves the mean (average). |
| LIST_STAT_MEDIAN | Retrieves the median number. |
| LIST_STAT_STD_DEV | Calculates the standard deviation. |
| LIST_STAT_SUM | Calculates the sum. |
| LIST_STAT_SUM_SQUARES | Calculates the sum of the squares. |
| LIST_STAT_NUM_COUNT | Retrieves the amount of float and integer elements. Theoretically similar to llGetListLength, except LL states that this function ignores all non-integer and non-float elements. Therefore, this is a useful tool for mixed lists of numbers and non-numbers. |
| LIST_STAT_GEOMETRIC_MEAN | Calculates the geometric mean. All numbers must be greater than zero for this to work, according to LL. |
| LIST_STAT_RANGE | Returns the range. |
Functions |
List |
Mathematics