Vector2.Max 最大

static function Max (lhs : Vector2, rhs : Vector2) : Vector2

Description描述

Returns a vector that is made from the largest components of two vectors.

返回一个由两个向量的最大组件组成的向量。

参见:Min 函数.

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public Vector2 a = new Vector2(1, 3);
	public Vector2 b = new Vector2(4, 2);
	public void Awake() {
		print(Vector2.Max(a, b));
	}
}
var a : Vector2 = Vector2 (1, 3);
var b : Vector2 = Vector2 (4, 2);
print (Vector2.Max(a,b)); // prints (4.0,3.0)
Page last updated: 2011-1-4