mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
MetaDataRef: Make set_float
preserve numbers exactly (#16090)
This commit is contained in:
parent
6f3735281f
commit
d96f5e1c76
6 changed files with 92 additions and 12 deletions
|
@ -465,6 +465,10 @@ inline std::string ftos(float f)
|
|||
return oss.str();
|
||||
}
|
||||
|
||||
/// @brief Converts double to string. Handles high precision and inf/nan.
|
||||
std::string my_double_to_string(double number);
|
||||
/// @brief Converts string to double. Handles high precision and inf/nan.
|
||||
std::optional<double> my_string_to_double(const std::string &s);
|
||||
|
||||
/**
|
||||
* Replace all occurrences of \p pattern in \p str with \p replacement.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue