mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
IniFile: Use a formatting for floats that makes them survive round-trips to a decimal string and back in all cases.
See https://randomascii.wordpress.com/2012/03/08/float-precisionfrom-zero-to-100-digits-2/
This commit is contained in:
parent
a48f2add68
commit
e9b3f1154d
@ -47,12 +47,12 @@ public:
|
||||
|
||||
void Set(const std::string& key, float newValue)
|
||||
{
|
||||
Set(key, StringFromFormat("%f", newValue));
|
||||
Set(key, StringFromFormat("%#.9g", newValue));
|
||||
}
|
||||
|
||||
void Set(const std::string& key, double newValue)
|
||||
{
|
||||
Set(key, StringFromFormat("%f", newValue));
|
||||
Set(key, StringFromFormat("%#.17g", newValue));
|
||||
}
|
||||
|
||||
void Set(const std::string& key, int newValue)
|
||||
|
Loading…
Reference in New Issue
Block a user