Maybe `this.rx || Math.min(this.rx, this.width / 2)` instead, so that rx=0 — very common case — doesn't suffer in performance?