mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-22 17:17:17 +01:00
incorrect range value with min value and step
If the minimum value and the steps are greater than 0, the value will not be calculated correctly. Co-Authored-By: Astral-Sheep <109028693+Astral-Sheep@users.noreply.github.com> (cherry picked from commit fe1f8443a411c64eb8a2934512ab982f3df3d550)
This commit is contained in:
parent
6064befd94
commit
6040a9b37c
@ -78,7 +78,7 @@ void Range::Shared::emit_changed(const char *p_what) {
|
||||
|
||||
void Range::set_value(double p_val) {
|
||||
if (shared->step > 0) {
|
||||
p_val = Math::round(p_val / shared->step) * shared->step;
|
||||
p_val = Math::round((p_val - shared->min) / shared->step) * shared->step + shared->min;
|
||||
}
|
||||
|
||||
if (_rounded_values) {
|
||||
|
Loading…
Reference in New Issue
Block a user