max
lib callCapy
function max(a : f32, b : f32) f32 function max(a : f64, b : f64) f64 function max(a : s8, b : s8) s8 function max(a : s16, b : s16) s16 function max(a : s32, b : s32) s32 function max(a : s64, b : s64) s64 function max(a : u8, b : u8) u8 function max(a : u16, b : u16) u16 function max(a : u32, b : u32) u32 function max(a : u64, b : u64) u64
Description
Both arguments must have the same static type. For floating-point input a NaN argument yields NaN.
Parameters
a : the first number
b : the second number, in the same type
Return Values
The larger of the two, in their type.
Example
Capy
print(max(3, 9), " ", max(-1.5, 2.0), "\n")
Output
9 2