From 3bfd11a1b87b62c31aba39f07052d68d890fa6bb Mon Sep 17 00:00:00 2001 From: Causeless Date: Thu, 28 Dec 2023 22:18:12 +0000 Subject: [PATCH] Hopeful fix to ensure floats are saved in a reasonable manner --- System/Writer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/System/Writer.cpp b/System/Writer.cpp index 9813ab21f..81be0b518 100644 --- a/System/Writer.cpp +++ b/System/Writer.cpp @@ -1,6 +1,8 @@ #include "Writer.h" #include "System.h" +#include + namespace RTE { ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -41,7 +43,9 @@ namespace RTE { System::MakeDirectory(System::GetWorkingDirectory() + m_FolderPath); } - return Create(std::make_unique(fileName, append ? (std::ios::out | std::ios::app | std::ios::ate) : (std::ios::out | std::ios::trunc))); + auto ofStream = std::make_unique(fileName, append ? (std::ios::out | std::ios::app | std::ios::ate) : (std::ios::out | std::ios::trunc)); + *ofStream << std::fixed << std::setprecision(6); + return Create(std::move(ofStream)); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////