mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-21 10:41:42 +00:00
Always try to eliminate branches if tree-shaking is enabled
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user