the macro "PixelAligned" has some mistake
Posted: Mon Oct 06, 2008 11:23
After my test, the macro
"#define PixelAligned(x)( (float)(int)(( x ) + (( x ) > 0.0f ? 0.5f : -0.5f)) )"
is wrong. The right should be:
"#define PixelAligned(x)((float)((x) + ((x) >= 0.0f ? 0.5f : -0.5f)))"
"#define PixelAligned(x)( (float)(int)(( x ) + (( x ) > 0.0f ? 0.5f : -0.5f)) )"
is wrong. The right should be:
"#define PixelAligned(x)((float)((x) + ((x) >= 0.0f ? 0.5f : -0.5f)))"