Vector operations in Unity

  • zero vector

The zero vector is a very special vector, it is the only vector with size 0 and the only vector with no direction.
    A 2D zero vector is represented as (0,0) and a 3D zero vector is represented as (0,0,0).
    In Unity, use Vector3.zero to represent a 3D zero vector.

  • negative vector

Every vector has a negative vector, satisfying the condition: the sum of a vector and its negative vector is equal to the zero vector.
    Negating a vector results in a vector that is equal in magnitude to the original vector and opposite in direction.
    The negative vector of (2,-3,3) is (-2,3,-3). That is, each component of the vector is made negative.

Guess you like

Origin blog.csdn.net/Brave_boy666/article/details/126912451