static function Max (a : float, b : float) : float
static function Max (params values : float[]) : float
Description描述
Returns largest of two or more values.
返回两个或更多值中最大的值。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
print(Mathf.Max(1.2F, 2.4F));
}
}
// prints 2.4
print(Mathf.Max(1.2, 2.4));
•static function Max (a : int, b : int) : int
•static function Max (params values : int[]) : int
Description描述
Returns the largest of two or more values.
返回两个或更多值中最大的值。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
print(Mathf.Max(1, 2));
}
}
// prints 2
print(Mathf.Max(1, 2));