def cross(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>result = Vector3(r1.size, r1.deriv)<EOL>result.x = r1.y*r2.z - r1.z*r2.y<EOL>result.y = r1.z*r2.x - r1.x*r2.z<EOL>result.z = r1.x*r2.y - r1.y*r2.x<EOL>return result<EOL>
Compute the cross product

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

       (Returns a Vector3)