1 import * as a from "liba.so";
2 function assert(expr) {
7 var ctx = new a.trajtrap();
8 assert("ctx.gen(3, 2, 3, 0, 10) != undefined");
9 assert("ctx.t != undefined");
10 assert("ctx.tv != undefined");
11 assert("ctx.ta != undefined");
12 assert("ctx.td != undefined");
13 assert("ctx.taj != undefined");
14 assert("ctx.tdj != undefined");
15 assert("ctx.p0 != undefined");
16 assert("ctx.p1 != undefined");
17 assert("ctx.v0 != undefined");
18 assert("ctx.v1 != undefined");
19 assert("ctx.vm != undefined");
20 assert("ctx.jm != undefined");
21 assert("ctx.am != undefined");
22 assert("ctx.dm != undefined");
23 for (var i = 0; i < ctx.t; i += ctx.t / 10) {
24 console.log(i, ctx.pos(i), ctx.vel(i), ctx.acc(i), ctx.jer(i));