So I am trying to develop a sort of 2d spacesim engine for creating games in C++. The project uses SFML for graphics, and I am currently trying to compile it on Linux using g++.
The main issue that I am wrestling with is that of simulation objects having their position, velocity, and rotation variables constantly getting set to NaN for reasons that are beyond me. The behaviour is not consistent, and occasionally will occur or not occur without any discernible pattern.
where Armstrong class is the one that gets defined at the end. The position and rotation information is inherited from Simulation_Object, with a few other things like velocity being inherited from the Newtonian_Object class.
So, basically, I have no idea where the error is, although Newtonian_object or Vessel_I would be good bets.
More generally, I need to get a rough idea of where the first variable is going to NaN. What sort of operations could be responsible?