def clipMinMax(size, minSize, maxSize):
 return size.expandedTo(minSize).boundedTo(maxSize)

def clipMinMax ( size , minSize , maxSize ) : return size . expandedTo ( minSize ) . boundedTo ( maxSize )
clip the size so it is bigger then minsize but smaller than maxsize .