def triangleArea(ax, ay, bx, by, cx, cy):
    """Returns the area of a triangle given its 3 vertices in
    cartesian coordinates.
    """
    # Formula found in:
    # http://www.mathopenref.com/coordtrianglearea.html

    return abs(ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) / 2