Ideally there is a way to vertically/horizontally center and size the image's parent without having to use math around the image's dimensions (have you looked at http://css-tricks.com/centering-in-the-unknown/?). If that's not possible and you need to calculate here, I'd ask that you:

1. document here in comments what this is set of lines is doing
2. make a note in your SCSS where you define the rest of the image is zoomed styles that the sizing/placement is controlled through JavaScript