[Zope] Photo: somes issues and thoughts

J M Cerqueira Esteves jmce@artenumerica.com
Fri, 4 Jan 2002 11:59:01 +0000


* marc lindahl <marc@bowery.com> [2002-01-04 03:16 +0000]:
> >> if hM > h0 * wM / w0:
> >>   height = h0 * wM / w0
> >>   width = wM
> >> else:
> >>   height = hM
> >>   width =  w0 * hM / w0
> > 
> The last line is wrong:
> 
> width = h0 * hM / w0

Yes, it was wrong, but it should be  width = w0 * hM / h0 ...

> But as for float vs fix, I think if you do the same calculation with float
> you'll still get the same result after you int.  

Not always.