src/OpenRoad.cc
// Return the point inside rect that is closest to pt.
Return the point inside rect that is closest to pt.
Return the point inside rect that is closest to pt .
Point
closestPtInRect(Rect rect,
		Point pt)
{
  return Point(min(max(pt.getX(), rect.xMin()), rect.xMax()),
               min(max(pt.getY(), rect.yMin()), rect.yMax()));
}
Point closestPtInRect ( Rect rect , Point pt ) { return Point ( min ( max ( pt . getX ( ) , rect . xMin ( ) ) , rect . xMax ( ) ) , min ( max ( pt . getY ( ) , rect . yMin ( ) ) , rect . yMax ( ) ) ) ; }
Return the point inside rect that is closest to pt.
Return the point inside rect that is closest to pt .