public static bool test(int n, string v1, string v2) { var bodies = new NBodySystem(); if (!v1.equals("" + bodies.energy())) return false; for (int i = 0; i < n; ++i) bodies.advance(0.01); return v2.equals("" + bodies.energy()); }
public static bool test(int n, string v1, string v2) { var bodies = new NBodySystem(); if (!v1.equals("" + bodies.energy())) { return(false); } for (int i = 0; i < n; ++i) { bodies.advance(0.01); } return(v2.equals("" + bodies.energy())); }