Fix incorrect rendering (patch included)
Status: Beta
Brought to you by:
hessint
The attached patch fixes a rendering bug that results in the attached shapes-broken.pgm image. The expected image is attached as shapes.pgm.
The patch replaces a comparison ((float)x == 0.0) by (fabs(x) < very_small_fp_value).
Due to floating point not being exact, it depends on the FP format and the CPU whether a direct comparison will be true or not.
The ==0.0 test breaks on PowerPC and X86_64.
Patch
Broken result (Patch not applied)
Expected result (Patch applied)