> From: J M Cerqueira Esteves <jmce@artenumerica.com> > while Photo uses (with integer division, therefore with truncation > everywhere): > > if hM > h0 * wM / w0: > height = h0 * wM / w0 > width = wM > else: > height = hM > width = w0 * hM / w0 Look at the order of operations - the truncation doesn't hurt anything.