Skip to content

Commit 3bfd11a

Browse files
committed
Hopeful fix to ensure floats are saved in a reasonable manner
1 parent 7359c38 commit 3bfd11a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

System/Writer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "Writer.h"
22
#include "System.h"
33

4+
#include <iomanip>
5+
46
namespace RTE {
57

68
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -41,7 +43,9 @@ namespace RTE {
4143
System::MakeDirectory(System::GetWorkingDirectory() + m_FolderPath);
4244
}
4345

44-
return Create(std::make_unique<std::ofstream>(fileName, append ? (std::ios::out | std::ios::app | std::ios::ate) : (std::ios::out | std::ios::trunc)));
46+
auto ofStream = std::make_unique<std::ofstream>(fileName, append ? (std::ios::out | std::ios::app | std::ios::ate) : (std::ios::out | std::ios::trunc));
47+
*ofStream << std::fixed << std::setprecision(6);
48+
return Create(std::move(ofStream));
4549
}
4650

4751
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)