https://onlinebme.com/unit/min-max-and-input-functions/