Two celestial bodies exist in a 3-dimensional (x,y,z) universe where only newtonian mechanics apply.
Write a function which calculates the distance between these two boddies at any time, given their initial positions and velocities.
struct body
{
array<double,3> position; // (x,y,z)
array<double,3> velocity; // (dx,dy,dz)
double mass;
};
double distance(double time, body const& initial_a, body const& initial_b);
Hint: this is the two-body problem, which is well understood. Use any resources you like 😉
EDIT: The solution to the algorithm can be seen in my latest post. I've left the implementation as an easier challenge. <#1021424011835613244 message>

