#SquirrelJME: I actually implemented Math.min() and Math.max() wrong, they were comparing A against zero and then returning A if it was less/more than zero, otherwise B. I should probably work on making unit tests and a test framework now that I have something that runs code.