def _generate_tangents_for_triangle(self, prim, pos_tol, zero_tol):
        du = [0, 0, 0]
        dv = [0, 0, 0]
        (i1, i2, i3) = prim                                                                     # Primitive indexes
        (v1, v2, v3) = (self.positions[i1], self.positions[i2], self.positions[i3])             # Vertex positions
        uvs = self.uvs[0]
        (uv1, uv2, uv3) = (uvs[i1], uvs[i2], uvs[i3])                                           # Vertex UVs
        (e21, e31, e32) = (vmath.v3sub(v2, v1), vmath.v3sub(v3, v1), vmath.v3sub(v3, v2))       # Generate edges
        # Ignore degenerates
        if vmath.v3is_zero(e21, pos_tol) or vmath.v3is_zero(e31, pos_tol) or vmath.v3is_zero(e32, pos_tol):
            LOG.warning("%s: Found degenerate triangle:%s", "_generate_tangents_for_triangle", (i1, i2, i3))
        else:
            # Calculate tangent and binormal
            edge1 = [e21[0], uv2[0] - uv1[0], uv2[1] - uv1[1]]
            edge2 = [e31[0], uv3[0] - uv1[0], uv3[1] - uv1[1]]
            cp = vmath.v3cross(edge1, edge2)
            if not vmath.iszero(cp[0], zero_tol):
                du[0] = -cp[1] / cp[0]
                dv[0] = -cp[2] / cp[0]
            edge1[0] = e21[1] # y, s, t
            edge2[0] = e31[1]
            cp = vmath.v3cross(edge1, edge2)
            if not vmath.iszero(cp[0], zero_tol):
                du[1] = -cp[1] / cp[0]
                dv[1] = -cp[2] / cp[0]
            edge1[0] = e21[2] # z, s, t
            edge2[0] = e31[2]
            cp = vmath.v3cross(edge1, edge2)
            if not vmath.iszero(cp[0], zero_tol):
                du[2] = -cp[1]/cp[0]
                dv[2] = -cp[2]/cp[0]
        return (du, dv)
    # pylint: enable=R0914
Expose a function using a different name via XML-RPC.
dataset/ETHPy150Open turbulenz/turbulenz_tools/turbulenz_tools/tools/mesh.py/Mesh._generate_tangents_for_triangle--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_SimpleXMLRPCServer.py/SimpleXMLRPCServerTestCase.test_exposeFunction2