operator -(Vector4)
Negates a vector.
Read time 1 minuteLast updated 9 days ago
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)); }}