Site Tools
Sidebar
User's Manual
t2:max
max
max — Find highest value
Description
int32 max(int32 numA, int32 numB);
fix32 max(fix32 numA, fix32 numB);
Returns the largest of numA and numB. If both are equivalent, numA is returned.
Parameters
- numA, numB: Values to compare.
Return Value
The largest of the values passed as arguments.
Examples
Example #1 max() example
init { printf("%d", max(1, 2)); // 2 printf("%d", max(2, 1)); // 2 printf("%c", max('a', 'z')); // z printf("%.2f", max(3.14, 2.72)); // 3.14 }
See Also
t2/max.txt · Last modified: 2016/11/12 17:20 by J2Kbr