Mathf.Min 最小值

static function Min (a : float, b : float) : float
static function Min (params values : float[]) : float

Description描述

Returns the smallest of two or more values.

返回两个或更多值中最小的值。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print(Mathf.Min(1.2F, 2.4F));
	}
}
// prints 1.2
print(Mathf.Min(1.2, 2.4));

•static function Min (a : int, b : int) : int
•static function Min (params values : int[]) : int

Description描述

Returns the smallest of two or more values.

返回两个或更多值中最小的值。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print(Mathf.Min(1, 2));
	}
}
// prints 1
print(Mathf.Min(1, 2));
Page last updated: 2011-2-22