(r)
return pt(r[0][0] + w / 2, r[0][1] + h / 2)
Return the center of a rectangle <r>.
Return the center of a rectangle <r>.
Return the center of a rectangle <r > .
def rectcenter(r):
    """"Return the center of a rectangle <r>."""
    w = r[1][0] - r[0][0]
    h = r[1][1] - r[0][1]
    
    return pt(r[0][0] + w / 2, r[0][1] + h / 2)
def rectcenter ( r ) : w = r [ 1 ] [ 0 ] - r [ 0 ] [ 0 ] h = r [ 1 ] [ 1 ] - r [ 0 ] [ 1 ] return pt ( r [ 0 ] [ 0 ] + w / 2 , r [ 0 ] [ 1 ] + h / 2 )