Updated LinearFunction class to better handle cases where the minimum and maximum x values are equal