Nit: I'd just make two variables here called `centerX` and `centerY`. It looks like you're never referring to `center` itself, just the member variables.