Average
From EventScripts Community Encyclopedia
|
[edit] OverviewSyntax: Note: Command parameters are described inside the
< and > characters. Optional parameters are contained within [ and ] characters.Variation of this command that doesn't expand variables: average [edit] DescriptionAverages a given set of numbers and can round the results. [edit] Parameters
[edit] Exampleses_xsetinfo myvar 0 //Round a set of numbers 3, 3, 6, and 3 and store it to myvar average myvar 3 3 6 3 // myvar = 3.75 // This stores the rounded average to myvar. average myvar round 3 3 6 3 // myvar = 4 // This stores the average rounded up to myvar. average myvar ceiling 3 3 6 3 // myvar = 4 // This stores the average rounded down to myvar. average myvar floor 3 3 6 3 // myvar = 3
[edit] Notes
[edit] See also |
|
