@Min (JavaScript)

Returns the smallest number in a group of numbers.

Defined in

@Functions (JavaScript)

Syntax

@Min(values:...) : double
Parameter Description
values Numbers or arrays of numbers.
Return value Description
double The smallest number.

Usage

Scalar parameters and array parameters are all searched for the minimum value.

Examples

This example generates 16 random numbers and gets the minimum and maximum numbers.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var a = new Array();
for(var i = 0; i < 16; i++) {
	a.push(@Random());
}
min = @Min(a);
max = @Max(a);
p("Random numbers " + min + " through " + max);