Min

From Kolmafia
Revision as of 19:48, 10 March 2010 by imported>StDoodle (Created page with '{{ #vardefine:name|min}}{{ #vardefine:return_type|int}}{{ FunctionPage| name={{#var:name}}| function_category=Math and Numbers| function1={{Function| name={{#var:name}}| aggreg…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
needs(code_samples);

Function Syntax

int min(int a ,int b )

float min(float a ,float b )

  • a is the first number to compare
  • b is the second number to compare

Compares two numbers, and returns the lower of the two. Note that it is possible to mix an int and float type in the parameters, in which case the int parameter will be transparently converted to a float, and the value returned will be of float type.

See Also

max()