#unity/日常积累

public static float Min (float a, float b);

public static float Min (params float[] values);

描述

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
using UnityEngine;

public class ScriptExample : MonoBehaviour
{
    void Start()
    {
        // prints 1.2
        Debug.Log(Mathf.Min(1.2f, 2.4f));
    }
}