[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Aug 4 19:02:23 CEST 2004


On Tuesday 03 August 2004 22:36, Andrew Walker wrote:
> CVS commit by arwalker:
> Fix for 86524.
>
> -#define X_MIN_DIFFERENCE 0.000001
> -#define Y_MIN_DIFFERENCE 0.000001
> +#define X_MIN_DIFFERENCE (MINDOUBLE*10.0)
> +#define Y_MIN_DIFFERENCE (MINDOUBLE*10.0)
>

  I'm not sure that this can be correct anywhere except around 0.0.  MINDOUBLE 
is defined to be the smallest value represented by double.  

  The zoom logic looks like this:

 if (ymax_in > ymin_in + Y_MIN_DIFFERENCE) { // only accept new range if valid
    YMax = ymax_in;
    YMin = ymin_in;
    return true;
  }

   However floats are not evenly distributed.  This means that while the 
difference between 0 and [first_positive_neighbor_of_0] is MINDOUBLE, further 
out it could be very many times MINDOUBLE.

-- 
George Staikos
KDE Developer			http://www.kde.org/
Staikos Computing Services Inc.	http://www.staikos.net/



More information about the Kst mailing list