Max: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
Created page with '{{ #vardefine:name|max}}{{ #vardefine:return_type|int}}{{ FunctionPage| name={{#var:name}}| function_category=Math and Numbers| function1={{Function| name={{#var:name}}| aggreg…'
 
imported>Bale
mNo edit summary
Line 5: Line 5:
FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Math and Numbers|


function1={{Function|
function1={{Function|
Line 33: Line 32:
see_also={{SeeAlso|min}}|
see_also={{SeeAlso|min}}|
}}
}}
[[Category:Math and Numbers]]

Revision as of 05:06, 22 May 2010

needs(code_samples);

Function Syntax

int max(int a ,int b )

float max(float a ,float b )

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

Compares two numbers, and returns the higher 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

min()