Bladeren bron

Small cleanup

Lukas Angerer 2 jaren geleden
bovenliggende
commit
d28cfe2ad6
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 2 2
      Day24/LuckyShot.cs
  2. 1 0
      Day24/Program.cs

+ 2 - 2
Day24/LuckyShot.cs

@@ -21,8 +21,8 @@ public class LuckyShot
         for (var i = 0; i < 3; i++)
         {
             var h = _lines[i];
-            equations.Add($"equations.append(({h.Position.X} - sx) / (vsx - {h.Velocity.X}) - ({h.Position.Y} - sy) / (vsy - {h.Velocity.Y}))");
-            equations.Add($"equations.append(({h.Position.X} - sx) / (vsx - {h.Velocity.X}) - ({h.Position.Z} - sz) / (vsz - {h.Velocity.Z}))");
+            equations.Add($"equations.append(({h.Position.X} - sx) / (vsx - ({h.Velocity.X})) - ({h.Position.Y} - sy) / (vsy - ({h.Velocity.Y})))");
+            equations.Add($"equations.append(({h.Position.X} - sx) / (vsx - ({h.Velocity.X})) - ({h.Position.Z} - sz) / (vsz - ({h.Velocity.Z})))");
         }
         Console.WriteLine(string.Join("\n", equations));
 

+ 1 - 0
Day24/Program.cs

@@ -28,6 +28,7 @@ Console.WriteLine($"Total: {count}");
 
 Console.WriteLine();
 Console.WriteLine("Just put the following code into Python. It's much easier that way.");
+Console.WriteLine("https://jupyter.org/try-jupyter/lab/");
 Console.WriteLine("-----");
 var lucky = new LuckyShot(lines);
 lucky.Find();