Built-In Namespace Math

A built in namespace containing mathmatical constants and functions.

Method Summary
Method Attributes Method Name and Description
<static>  
Math.avg()
Calculate the average value from a list of numbers.
<static>  
Math.rand(min, max)
Extension to Math.random which returns an integer between 2 values instead of a random float.
Method Detail
<static> {Number} Math.avg()
Calculate the average value from a list of numbers.
Parameters:
{Number} ...
Arguments forming a list of numbers to create and average of
Returns:
{Number} The average of all the numbers passed

<static> {Number} Math.rand(min, max)
Extension to Math.random which returns an integer between 2 values instead of a random float. Partly borrowed from https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Math/random#Example.3a_Using_Math.random
Parameters:
{Number} min
The lowest number (inclusive) to return
{Number} max
The highest number (inclusive) to return
Returns:
{Number} A random integer between min and max