operator + method

Vector3D operator +(
  1. Vector3D other
)

Adds other to this vector.

Implementation

Vector3D operator +(Vector3D other) =>
    Vector3D(x + other.x, y + other.y, z + other.z);