Vector4.operator / 运算符 除法

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

Description描述

Divides a vector by a number.

一个向量除以一个数。

Divides each component of a by a number d.

向量a的每一个组件分别除以d。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print(new Vector4(1, 2, 3, 4) / 2.0F);
	}
}
// make the vector twice shorter: prints (0.5,1.0,1.5,2.0)
// 使向量缩短一半:prints (0.5,1.0,1.5,2.0)

print (Vector4(1,2,3,4) / 2.0);
Page last updated: 2011-1-9