Note: Entering a value that isn't a valid option for the y-intercept will set it to the maximum, and entering a value that isn't a valid option for the slope will set it to undefined. In case you're confused, let m represent the slope and b represent the y-intercept; y = mx + b Ok this was absolutely terrible there was a bug in my code and it took too long to find