getLimitedCenterYInside method
Implementation
double getLimitedCenterYInside(Rect container) {
if (height > container.height) {
return center.dy + min(0, container.top - top) + max(0, container.bottom - bottom);
} else {
return container.center.dy;
}
}