Always try to eliminate branches if tree-shaking is enabled

This commit is contained in:
dcodeIO
2018-04-24 23:11:11 +02:00
parent 97e7158fff
commit 391db28fe2
38 changed files with 782 additions and 789 deletions

View File

@ -116,13 +116,13 @@ class NBodySystem {
}
var system;
function init() {
var bodies = new Array();
bodies.push(Sun());
bodies.push(Jupiter());
bodies.push(Saturn());
bodies.push(Uranus());
bodies.push(Neptune());
system = new NBodySystem(bodies);
system = new NBodySystem([
Sun(),
Jupiter(),
Saturn(),
Uranus(),
Neptune()
]);
}
exports.init = init;
function getBody(index) {