GM: median

From GMpedia.org Wiki

Jump to: navigation, search

median
 

Type: function
Arguments: 1: value
2: value
n: ...
Limitations: None

The median function is a mathematical function in Game Maker that returns the median of the entered arguments. The function can have up to 16 arguments. All arguments must be real.


[edit] Examples

median(5,8,20);

returns 8

median(8,6,7,5,4,2);

returns 5

Personal tools