'use strict';
window.N = 1000000;
class PointAndVelocity {
constructor(x, y, vx, vy) {
this.x = x;
this.y = y;
this.vx = vx;
this.vy = vy;
}
}
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
}
class Velocity {
constructor(vx, vy) {
this.vx = vx;
this.vy = vy;
}
}
aos = Array(N).fill(new PointAndVelocity(0, 0, 0, 0))
.map(() => new PointAndVelocity(Math.random() * 100|0, Math.random() * 100|0, Math.random() * 100|0, Math.random() * 100|0));
points = Array(N).fill(new Point(0, 0)).
.map((_, i) => new Point(aos[i].x, aos[i].y));
velocities = Array(N).fill(new Velocity(0, 0)).
.map((_, i) => new Velocity(aos[i].vx, aos[i].vy));