Search found 2 matches

by flyue
Tue Oct 07, 2008 10:23
Forum: Offtopic Discussion
Topic: the macro "PixelAligned" has some mistake
Replies: 3
Views: 4541

Thank you very much for the reply, although my English is not very good

now I am reading your CEGUI source code, I learned a lot of new techniques from it.

In China, there are many video games use CEGUI :D , so I'm learning it now.
by flyue
Mon Oct 06, 2008 11:23
Forum: Offtopic Discussion
Topic: the macro "PixelAligned" has some mistake
Replies: 3
Views: 4541

the macro "PixelAligned" has some mistake

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)))" :roll:

Go to advanced search