def dot(u, v):
    """Compute the dot product of two vectors.

    Parameters
    ----------
    u : array
        XYZ components of the first vector.
    v : array
        XYZ components of the second vector.

    Returns
    -------
    float
        u . v.
    """
    return u[0] * v[0] + u[1] * v[1] + u[2] * v[2]