Vector3.operator + 运算符 加法

static operator + (a : Vector3, b : Vector3) : Vector3

Description描述

Adds two vectors.

两个向量相加。

Adds corresponding components together.

每个相对应的组件相加在一起。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print(new Vector3(1, 2, 3) + new Vector3(4, 5, 6));
	}
}
// prints (5.0,7.0,9.0)
print (Vector3(1,2,3) + Vector3(4,5,6));

 

Page last updated: 2010-12-20