Difference between revisions of "Math and Numbers"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>StDoodle
m
Line 4: Line 4:
 
{{Flink|int|floor|float|desc=Returns the next lowest value of the specified number as an integer.}}
 
{{Flink|int|floor|float|desc=Returns the next lowest value of the specified number as an integer.}}
 
{{Flink|int|truncate|float|desc=Returns the decimal-stripped value of the specified number as an integer.}}
 
{{Flink|int|truncate|float|desc=Returns the decimal-stripped value of the specified number as an integer.}}
 +
{{Flink|int|round|float|desc=Returns the value of the specified number as rounded to the nearest integer.}}
 
{{Flink|int|min|int|int}}
 
{{Flink|int|min|int|int}}
 
{{Flink|float|min|float|float|desc=Returns the lower of two numbers.}}
 
{{Flink|float|min|float|float|desc=Returns the lower of two numbers.}}

Revision as of 00:28, 13 March 2010

boolean is_numeric( string )

Reports whether a string is an integer.

int random( int )

Generates a random integer between 0 and 1 less than the specified number, inlcusive.

int ceil( float )

Returns the next highest value of the specified number as an integer.

int floor( float )

Returns the next lowest value of the specified number as an integer.

int truncate( float )

Returns the decimal-stripped value of the specified number as an integer.

int round( float )

Returns the value of the specified number as rounded to the nearest integer.

int min( int, int )

float min( float, float )

Returns the lower of two numbers.

int max( int, int )

float max( float, float )

Returns the higher of two numbers.

float square_root( float )

Returns the square root of the specified value.