Math and Numbers

From Kolmafia
Revision as of 19:36, 10 March 2010 by imported>StDoodle (Created page with '{{Flink|int|random|int|desc=Generates a random integer between 0 and 1 less than the specified number, inlcusive (produces an error when supplied a value of 1).}} {{Flink|int|cei…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

int random( int )

Generates a random integer between 0 and 1 less than the specified number, inlcusive (produces an error when supplied a value of 1).

int ceil( float )

Returns the next highest value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0).

int floor( float )

Returns the next lowest value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0).

int truncate( float )

Returns the decimal-stripped value of the specified number as an integer (returns the number if integer form if decimal portion is equal to 0).

float square_root( float )

Returns the square root of the specified value.