Simplifies resize calculation