Math and Numbers: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
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…'
 
imported>StDoodle
mNo edit summary
Line 2: Line 2:
{{Flink|int|ceil|float|desc=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).}}
{{Flink|int|ceil|float|desc=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).}}
{{Flink|int|floor|float|desc=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).}}
{{Flink|int|floor|float|desc=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).}}
{{Flink|int|min|int|int}}
{{Flink|float|min|float|float|desc=Returns the lower of two numbers.}}
{{Flink|int|max|int|int}}
{{Flink|float|max|float|float|desc=Returns the higher of two numbers.}}
{{Flink|int|truncate|float|desc=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).}}
{{Flink|int|truncate|float|desc=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).}}
{{Flink|float|square_root|float|desc=Returns the square root of the specified value.}}
{{Flink|float|square_root|float|desc=Returns the square root of the specified value.}}

Revision as of 19:42, 10 March 2010

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 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.

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.