2 * easing_functions_test.cxx
4 * Output values of all easing functions for plotting and some simple tests.
6 * Created on: 15.03.2013
10 #include "easing_functions.hxx"
14 #define VERIFY_CLOSE(a, b) \
15 if( std::fabs(a - b) > 1e-5 ) \
17 std::cerr << "failed: line " << __LINE__ << ": "\
23 int main(int argc, char* argv[])
25 using simgear::easing_functions;
27 for( double t = 0; t <= 1; t += 1/32. )
31 for( size_t i = 0; easing_functions[i].name; ++i )
32 std::cout << easing_functions[i].name << " ";
36 for( size_t i = 0; easing_functions[i].name; ++i )
38 double val = (*easing_functions[i].func)(t);
39 std::cout << val << " ";