Vector3.operator / 运算符 除法

static operator / (a : Vector3, d : float) : Vector3

Description描述

Divides a vector by a number.

由一个数除一个向量。也就是a/b。

Divides each component of a by a number d.

a的每一个组件分别除以b。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print(new Vector3(1, 2, 3) / 2.0F);
	}
}
// make the vector twice shorter: prints (0.5,1.0,1.5)
//使该向量缩小一半
print (Vector3(1,2,3) / 2.0);
Page last updated: 2011-1-2