Vector2.operator + 运算符 加法


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

Description描述

Adds two vectors.

两个向量相加。

Adds corresponding components together.  

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

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {print(new Vector2(1, 2) + new Vector2(2, 3));}}
// prints (3.0,5.0)print (Vector2(1,2) + Vector2(2,3));


,