기술 자료

Unity Engine

Unity Engine

operator -(Vector4)

Negates a vector.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Operator
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static Vector4 operator -(Vector4 a)

Parameters

The vector to negate.

Returns

Type

Description

Vector4

Remarks

Each component in the result is negated.

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { // prints (-1.0,-2.0,-3.0,-4.0) print(-new Vector4(1, 2, 3, 4)); }}