Runtime 'none' by default

This commit is contained in:
dcode
2019-04-09 08:28:14 +02:00
parent eb6c4c09ee
commit bb659bbdcd
31 changed files with 1253 additions and 1734 deletions

View File

@@ -49,7 +49,7 @@ class NBodySystem {
py += b.vy * m;
pz += b.vz * m;
}
bodies[0].offsetMomentum(px, py, pz);
unchecked(bodies[0]).offsetMomentum(px, py, pz);
}
advance(dt) {
var bodies = this.bodies;
@@ -139,6 +139,6 @@ function bench(steps) {
exports.bench = bench;
function getBody(index) {
var bodies = system.bodies;
return index < bodies.length ? bodies[index] : null;
return index < bodies.length ? unchecked(bodies[index]) : null;
}
exports.getBody = getBody;