OrbitalCalculator.cpp
//creates threads for each planets, which will update their position dependent on gravity force on that moment;
creates threads for each planets, which will update their position dependent on gravity force on that moment.
creates threads for each planets which will update their position dependent on gravity force on that moment .
void OrbitalCalculator::updatePlanetPositions() {
    auto *threads = new std::vector<std::thread *>();
    if (planets.empty()) {
        return;
    }
    for (int i = 0; i < planets.size(); i++) {
      auto thread = new std::thread(&OrbitalCalculator::updatePlanet, this, std::ref(planets[i]));
      updatePlanet(planets[i]);
      thread->join();
      threads->push_back(thread);
    }
}
void OrbitalCalculator :: updatePlanetPositions ( ) { auto * threads = new std :: vector < std :: thread * > ( ) ; if ( planets . empty ( ) ) { return ; } for ( int i = 0 ; i < planets . size ( ) ; i ++ ) { auto thread = new std :: thread ( & OrbitalCalculator :: updatePlanet , this , std :: ref ( planets [ i ] ) ) ; updatePlanet ( planets [ i ] ) ; thread -> join ( ) ; threads -> push_back ( thread ) ; } }
creates threads for each planets, which will update their position dependent on gravity force on that moment;
creates threads for each planets which will update their position dependent on gravity force on that moment ;