move python/src/a/*.pxi to python/src/a.pyx
[liba.git] / test / trajpoly7.h
blob221a74f0be41d2dde0fa50fc886b70fd092c49e5
1 #define MAIN_(x) A_CAST_2(x, _trajpoly7)
2 #include "test.h"
3 #include "a/trajpoly7.h"
5 int MAIN(int argc, char *argv[]) // NOLINT(misc-definitions-in-headers)
7 int start = 1;
8 if (argc > 1)
10 char *endptr = A_NULL;
11 (void)strtonum(argv[1], &endptr);
12 if (argv[1] == endptr)
14 main_init(argc, argv, 1);
15 ++start;
19 a_float arg[10] = {0};
20 for (int i = start; i < argc; ++i)
22 arg[i - start] = strtonum(argv[i], A_NULL);
24 a_trajpoly7 pt7;
25 a_trajpoly7_gen(&pt7, arg[1] - arg[0], arg[2], arg[3], arg[4], arg[5], arg[6], arg[7], arg[8], arg[9]);
26 for (a_float dt = arg[0], delta = (arg[1] - arg[0]) / 1000; dt < arg[1]; dt += delta) // NOLINT
28 debug(A_FLOAT_PRI("+", "f,") A_FLOAT_PRI("+", "f,") A_FLOAT_PRI("+", "f,") A_FLOAT_PRI("+", "f,") A_FLOAT_PRI("+", "f\n"),
29 dt, a_trajpoly7_pos(&pt7, dt), a_trajpoly7_vel(&pt7, dt), a_trajpoly7_acc(&pt7, dt), a_trajpoly7_jer(&pt7, dt));
32 #if defined(__cplusplus) && (__cplusplus > 201100L)
33 A_ASSERT_BUILD(std::is_pod<a_trajpoly7>::value);
34 #endif /* __cplusplus */
36 return 0;