HyperCard: How to Find the Center of a Rectangle (7/92)

This little utility script is used to find the point that's at the center
of a rectangle.

function centerOfRect rect
put item 3 of rect - item 1 of rect into width
put item 4 of rect - item 2 of rect into height
return round(item 1 of rect+width/2)&","&round(item 2 of rect + height/2)
end centerOfRect


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012