文档

Unity Engine

Unity Engine

operator /(Vector4, float)

Divides a vector by a number.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Operator
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static Vector4 operator /(Vector4 a, float d)

Parameters

The vector to divide.

The number to divide by.

Returns

Type

Description

Vector4

Remarks

Divides each component of
a
by a number
d
.

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { //Prints (0.5, 1.0, 1.5, 2.5) print(new Vector4(1, 2, 3, 5) / 2); }}