123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /////////////////////////////////////////////////////////////////////
- //define a consistent warning preprocessor for unix and win systems
- // see http://stackoverflow.com/questions/471935/user-warnings-on-msvc-and-gcc
- // Use:
- //
- //use as:
- //ERROR( This will be a compiler error );
- //MESSAGE( Well this is what I have to say about this code );
- //TODO( Still have to fix 3D rendering );
- //
- /////////////////////////////////////////////////////////////////////
- /////////////////////////////////////////////////////////////////////
- //
- typedef unsigned int uint;
- inline double round(double r) {
- return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
- }
- inline float roundf(float r)
- {
- return (float)round(r);
- }
|