mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
This commit is contained in:
@@ -258,7 +258,7 @@ void Range::set_as_ratio(double p_value) {
|
||||
} else {
|
||||
double percent = (get_max() - get_min()) * p_value;
|
||||
if (get_step() > 0) {
|
||||
double steps = round(percent / get_step());
|
||||
double steps = std::round(percent / get_step());
|
||||
v = steps * get_step() + get_min();
|
||||
} else {
|
||||
v = percent + get_min();
|
||||
|
||||
Reference in New Issue
Block a user