• Adds two 4D vectors element-wise.

    This function adds the corresponding elements of the two input vectors and stores the result in the destination vector. If no destination is provided, the first input vector is modified and returned.

    Parameters

    • u: Vec4

      The first 4D vector.

    • v: Vec4

      The second 4D vector.

    • Optionaldest: Vec4

      Optional destination vector to store the result. If not provided, the result is stored in the first vector.

    Returns Vec4

    The resulting 4D vector after addition.