1 #define MAIN_(x) A_CAST_2(x, _trajtrap)
3 #include "a/trajtrap.h"
5 int MAIN(int argc
, char *argv
[]) // NOLINT(misc-definitions-in-headers)
10 char *endptr
= A_NULL
;
11 (void)strtonum(argv
[1], &endptr
);
12 if (argv
[1] == endptr
)
14 main_init(argc
, argv
, 1);
20 for (int i
= start
; i
< argc
; ++i
)
22 arg
[i
- start
] = strtonum(argv
[i
], A_NULL
);
25 a_float t
= a_trajtrap_gen(&ctx
, arg
[0], arg
[1], arg
[2], arg
[3], arg
[4], arg
[5], arg
[6]);
26 for (a_float dt
= 0, delta
= t
/ 1000; dt
< t
; dt
+= delta
) // NOLINT
28 debug(A_FLOAT_PRI("+", "f,") A_FLOAT_PRI("+", "f,") A_FLOAT_PRI("+", "f,") A_FLOAT_PRI("+", "f\n"),
29 dt
, a_trajtrap_pos(&ctx
, dt
), a_trajtrap_vel(&ctx
, dt
), a_trajtrap_acc(&ctx
, dt
));
32 #if defined(__cplusplus) && (__cplusplus > 201100L)
33 A_ASSERT_BUILD(std::is_pod
<a_trajtrap
>::value
);
34 #endif /* __cplusplus */