parameters: (self, quad)
return_statement: return np.sum(edge) / 2.
docstring: compute area of a quad.
docstring_summary: compute area of a quad.
docstring_tokens: compute area of a quad .
function: def quad_area(self, quad):
          """
          compute area of a quad.
          """
          edge = [(quad[1][0] - quad[0][0]) * (quad[1][1] + quad[0][1]),
                  (quad[2][0] - quad[1][0]) * (quad[2][1] + quad[1][1]),
                  (quad[3][0] - quad[2][0]) * (quad[3][1] + quad[2][1]),
                  (quad[0][0] - quad[3][0]) * (quad[0][1] + quad[3][1])]
          return np.sum(edge) / 2.
function_tokens: def quad_area ( self , quad ) : edge = [ ( quad [ 1 ] [ 0 ] - quad [ 0 ] [ 0 ] ) * ( quad [ 1 ] [ 1 ] + quad [ 0 ] [ 1 ] ) , ( quad [ 2 ] [ 0 ] - quad [ 1 ] [ 0 ] ) * ( quad [ 2 ] [ 1 ] + quad [ 1 ] [ 1 ] ) , ( quad [ 3 ] [ 0 ] - quad [ 2 ] [ 0 ] ) * ( quad [ 3 ] [ 1 ] + quad [ 2 ] [ 1 ] ) , ( quad [ 0 ] [ 0 ] - quad [ 3 ] [ 0 ] ) * ( quad [ 0 ] [ 1 ] + quad [ 3 ] [ 1 ] ) ] return np . sum ( edge ) / 2.