1
0
Fork 0
flightgear/tests/est-epsilon.c
ehofman 667e64e1eb - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
- this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
   extensions.hxx was pulling in all of Carbon to the global namespace
   - very scary. As a result, I now need to explicitly include CoreFoundation
   in fg_init.cxx.
 - change SG_USING_STD(x) to using std::x
2008-07-27 16:25:13 +00:00

34 lines
464 B
C

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
#include <stdio.h>
#include <simgear/compiler.h>
#if defined( __APPLE__)
# include <OpenGL/OpenGL.h>
#else
# include <GL/gl.h>
#endif
int main() {
GLfloat a, t;
a = 1.0;
do {
printf("a = %.10f\n", a);
a = a / 2.0;
t = 1.0 + a;
} while ( t > 1.0 );
a = a + a;
printf("Estimated GLfloat epsilon = %.10f\n", a);
return(0);
}