Added documentation for general min and max functions