We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 16dde54 + 37e0c9b commit 7c472e6Copy full SHA for 7c472e6
1 file changed
scene/gui/range.cpp
@@ -272,12 +272,12 @@ double Range::get_as_ratio() const {
272
if (shared->exp_ratio && get_min() >= 0) {
273
double exp_min = get_min() == 0 ? 0.0 : Math::log(get_min()) / Math::log((double)2);
274
double exp_max = Math::log(get_max()) / Math::log((double)2);
275
- float value = CLAMP(get_value(), shared->min, shared->max);
+ double value = CLAMP(get_value(), shared->min, shared->max);
276
double v = Math::log(value) / Math::log((double)2);
277
278
return CLAMP((v - exp_min) / (exp_max - exp_min), 0, 1);
279
} else {
280
281
return CLAMP((value - get_min()) / (get_max() - get_min()), 0, 1);
282
}
283
0 commit comments