[geos-devel] Is this symmetric rounding algorithm?

Mateusz Łoskot mateusz at loskot.net
Fri Feb 24 09:26:29 EST 2006


Mateusz Łoskot wrote:
> 
>     printf("--- rint -------------------\n");
>     printf("x:   %f \n", rint_vc(x));
>     printf("x1: %f \n", rint_vc(x1));
>     printf("y:   %f \n", rint_vc(y));
>     printf("y1: %f \n", rint_vc(y1));

rint_vc is taken from geom\PrecisionModel.cpp file.

What I call symmetric rounding is:

Positive values +5.5 and +6.5 round up to +6 and +7.
So, negative equivalents of -5.5 and -6.5 should round (down) to -6 and -7.


Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the geos-devel mailing list