Strange problem with float rounding. How can this be?

On this marvelous C++ drive me crazy. Trying to do the bootloader .obj files using this library.

The model is loaded, then I get the screen tops but they are rounded. Everything after the decimal point discarded.
Put a breakpoint, turn on the debug and everything is fine. How is this possible??

Here is the output without debug
5e26236ff3880494272962.png

Here is the debug
5e26238821d4c203444258.png

5e26238ec41de069941032.png

Inside the library uses std::stof to convert a string to float. Maybe some locale settings affect or I do not know where to think
April 4th 20 at 13:05
1 answer
April 4th 20 at 13:07
Solution
Yes, the problem was in locale. Add std::locale::global(std::locale("C") ) solved the problem

Find more questions by tags C++