Added method for getting the bounding box

I don't know if using 4 if statements is faster since then it would only write to the variable if it had to, but this fits on 5 lines.