dea145b921
Suggestion: It might be helpful to promote each of the .c files to .cxx. Rationale: -- The configure/makefile system handles CFLAGS differently from CXXFLAGS. -- It is important for the *info programs to compiled and run in exactly the same environment as the main fgfs program. Some users depend on compiler or linker flags such as rpath that strongly affect the results of the *info programs. -- There is no downside; you code compiles just fine as-is under the c++ compiler. timoore split the original patch so that alcinfo.cxx can be commited to the ehofman/sound branch seperately.
34 lines
464 B
C++
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);
|
|
}
|