diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-07-28 01:27:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-28 01:27:34 +0200 |
| commit | a6916d1f179f760f015f385c01729d205af97abe (patch) | |
| tree | 50d664500e5ce164ed8498f34e84aef35678f225 /editor/property_editor.cpp | |
| parent | 932b75e2477dd97775b5b29639c514e091a83cf2 (diff) | |
| parent | 56e2c6c7043ca14159284b7b1f07e95d6fcf9a9e (diff) | |
| download | redot-engine-a6916d1f179f760f015f385c01729d205af97abe.tar.gz | |
Merge pull request #40678 from aaronfranke/string-float64
Make all String float conversion methods be 64-bit
Diffstat (limited to 'editor/property_editor.cpp')
| -rw-r--r-- | editor/property_editor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index c9115fb870..cb56358ae6 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -368,18 +368,18 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant:: float min = 0, max = 100, step = type == Variant::FLOAT ? .01 : 1; if (c >= 1) { if (!hint_text.get_slice(",", 0).empty()) { - min = hint_text.get_slice(",", 0).to_double(); + min = hint_text.get_slice(",", 0).to_float(); } } if (c >= 2) { if (!hint_text.get_slice(",", 1).empty()) { - max = hint_text.get_slice(",", 1).to_double(); + max = hint_text.get_slice(",", 1).to_float(); } } if (c >= 3) { if (!hint_text.get_slice(",", 2).empty()) { - step = hint_text.get_slice(",", 2).to_double(); + step = hint_text.get_slice(",", 2).to_float(); } } @@ -1590,7 +1590,7 @@ real_t CustomPropertyEditor::_parse_real_expression(String text) { Error err = expr->parse(text); real_t out; if (err != OK) { - out = value_editor[0]->get_text().to_double(); + out = value_editor[0]->get_text().to_float(); } else { out = expr->execute(Array(), nullptr, false); } |
