名称:max()
例子:
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
int[] values = { 9, -4, 362, 21 }; // Create an array of ints int d = max(values); // Sets 'd' to 362
描述:
确定数字序列中的最大值,然后返回该值。 max()接受两个或三个float或int值作为参数,或任意长度的数组。
语法:
max(a, b) max(a, b, c) max(list)
参数:
|
返回:int or float
相关:
- 本文固定链接: http://iprocessing.cn/2017/07/18/max-最大值/
- 转载请注明: Hewes 于 Processing编程艺术 发表
Pingback 引用通告: min() 最小值 | Processing编程艺术
Pingback 引用通告: constrain() 约束 | Processing编程艺术