def dot(r1, r2):
if r1.size != r2.size:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if r1.deriv != r2.deriv:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return r1.x*r2.x + r1.y*r2.y + r1.z*r2.z<EOL>
Compute the dot product

       Arguments:
        | ``r1``, ``r2``  -- two :class:`Vector3` objects

       (Returns a Scalar)