On 11.10.04, Michael J Gruber wrote:
> Joerg Lehmann venit, vidit, dixit 2004-10-11 16:48:
> >On 11.10.04, Magnus Lie Hetland wrote:
> >>If I want to find the ratio between two lengths (instanses of
> >>unit.length), what's the "standard" way of doing that? It seems that
> >>(for some reason) direct division isn't allowed...
> >The standard procedure is to first convert the lengths into an arbitrary
> >unit (using unit.topt or whatever you like) and then divide the
> >resulting numbers. But in principle, we could support the division of
> >two lengths - at least at the moment, I don't see any real reason why
> >this should not be possible.
> I submitted code which did that a while ago. I remember it was refused
> because this would force implicit "conversion of the units", i.e.
> application of scale factors at the time when __div__ is used. I'm not
> sure why this is a problem, but I'm not sure either whether I understand
> the lengths in PyX ;)
Yes, I remember that you've suggested the same some time ago and that we
have rejected your patch because of the implicit conversion which is
necessary to calculate the ratio. But thinking about it again, I'm not
sure whether this is a real problem. In fact, I don't think it is one.
The only thing which clearly doesn't make sense is the multiplication
of two lengths.
So feel free to submit your patch again.