In that case, I'd suggest 
```
dots_per_inch_width_ = ((resolution_width_ * 25.4) / physical_width_) : 0 ? physical_width_ != 0;
dots_per_inch_height_ = ((resolution_height_ * 25.4) / physical_height_) : 0 ? physical_height_ != 0;
```