`if (this.maxY > y) this.maxY = y;` might save a few bytes and it could theoretically be faster since it only needs to write `this.maxY` if it is really updated. I don't know whether that is optimised away in JS anyway...