hi,
(85 / 2.) + 44
86.5
It divides the height by two, and then adjusts it by the y coordinate.
cu.
On Fri, Dec 5, 2008 at 11:44 AM, Lin Parkh <lparkh@xxxxxxxxxxx> wrote:
I think I am confused about what center of a rectangle is becaue I am
getting an "odd" (to me) result.
Specifically:
#I define a rectangle:
tes =pygame.Rect(0,44,200,85)
#now i would expect the center of this rectangle to be be
((200+0)/2),(44+85)/2)) in other words (100, 64) instead I get:
tes.center
(100, 86)
Where did the 86 come from????
Please advise. Thanks for any help!