Difference between revisions of "LIST STAT MEDIAN"

From Second Life Wiki
Jump to: navigation, search
(New page: {{LSL Constant |name=LIST_STAT_MEDIAN |type=integer |value=4 |desc= |pa= |text= |pb= |examples |constants= <!--{{LSL ConstRow|CHANGED_SHAPE}}--> |functions= {{LSL DefineRow||[[llListStatis...)
 
m (<lsl> tag to <source>)
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|type=integer
 
|type=integer
 
|value=4
 
|value=4
|desc=
+
|desc=Calculates the median number in the list.
 +
<source lang="lsl2">
 +
float median = llListStatistics( LIST_STAT_MEDIAN, numList );
 +
</source>
 +
The median is the number for which half the values are less and half are greater. For example, the median of [1,1,1,2,1000,1000,1000] is 2, while the mean is 429.3.
 
|pa=
 
|pa=
 
|text=
 
|text=

Latest revision as of 14:57, 23 January 2015

Description

Constant: integer LIST_STAT_MEDIAN = 4;

The integer constant LIST_STAT_MEDIAN has the value 4

Calculates the median number in the list.

float median = llListStatistics( LIST_STAT_MEDIAN, numList );

The median is the number for which half the values are less and half are greater. For example, the median of [1,1,1,2,1000,1000,1000] is 2, while the mean is 429.3.

Related Articles

Functions

•  llListStatistics

Deep Notes

Search JIRA for related Issues

Signature

integer LIST_STAT_MEDIAN = 4;