Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Hopeful fix to ensure floats are saved in a reasonable manner
Browse files Browse the repository at this point in the history
  • Loading branch information
Causeless committed Dec 28, 2023
1 parent 7359c38 commit 3bfd11a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion System/Writer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "Writer.h"
#include "System.h"

#include <iomanip>

namespace RTE {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -41,7 +43,9 @@ namespace RTE {
System::MakeDirectory(System::GetWorkingDirectory() + m_FolderPath);
}

return Create(std::make_unique<std::ofstream>(fileName, append ? (std::ios::out | std::ios::app | std::ios::ate) : (std::ios::out | std::ios::trunc)));
auto ofStream = std::make_unique<std::ofstream>(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));
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 3bfd11a

Please sign in to comment.