[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fattens the 256 first braces. (issue4518052)

From: dak
Subject: Re: Fattens the 256 first braces. (issue4518052)
Date: Wed, 11 May 2011 08:54:40 +0000
File mf/ (right):
mf/ fatten := 1 + fatten_factor - min ( number *
fatten_factor / 256, fatten_factor);
This is a bit obscure to me.  How about

    fatten := min(number/256,1)[1+fatten_factor,1];

That makes it more obvious that the factor is running from
1+fatten_factor to 1.

There does not seem to be much point in using min, either, regarding
clarity.  So maybe the whole thing can be written as

if number<256:
  x := x*(number/256[1+fatten_factor,1]);

However, "fatten_factor" sounds like a _factor_, so it would make more
sense to change it to 2.5 (is that really the intended value?  Seems
really large!) and write this as

if number<256:
  x := (number/256)[x*fatten_factor,x];

I think that expresses the meaning better, even without requiring an
extra variable "fatten".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]