1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00: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:
Thaddeus Crews
2025-03-19 14:18:09 -05:00
parent c5c1cd4440
commit ad40939b6f
101 changed files with 414 additions and 498 deletions

View File

@@ -443,9 +443,9 @@ void JoypadLinux::joypad_vibration_start(Joypad &p_joypad, float p_weak_magnitud
struct ff_effect effect;
effect.type = FF_RUMBLE;
effect.id = -1;
effect.u.rumble.weak_magnitude = floor(p_weak_magnitude * (float)0xffff);
effect.u.rumble.strong_magnitude = floor(p_strong_magnitude * (float)0xffff);
effect.replay.length = floor(p_duration * 1000);
effect.u.rumble.weak_magnitude = std::floor(p_weak_magnitude * (float)0xffff);
effect.u.rumble.strong_magnitude = std::floor(p_strong_magnitude * (float)0xffff);
effect.replay.length = std::floor(p_duration * 1000);
effect.replay.delay = 0;
if (ioctl(p_joypad.fd, EVIOCSFF, &effect) < 0) {