max()

Category: Math

Subcategory: Calculation

Complexity: Advanced

Description

Determines the largest value in a sequence of numbers, and then returns that value. max() accepts either two or three float or int values as parameters, or an array of any length.

Related

Example

Code:
int a = max(5, 9);            // Sets 'a' to 9
int b = max(-4, -12);         // Sets 'b' to -4
float c = max(12.3, 230.24);  // Sets 'c' to 230.24
Preview: