The following produces 9/2 without needing to use simplify. :D

def area(A, B, C):
    """
    A, B & C are objects with x and y attributes
    :return: area of the trigon
    """
    x1 = B.x - A.x
    y1 = B.y - A.y
    x2 = C.x - A.x
    y2 = C.y - A.y
    return (x1*y2 - x2*y1) / 2

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/b747469c-58fb-4eab-ac92-2dbc5f2b6ede%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to