Infinity is actually a JavaScript constant, so no need for hacky math