style: aplicar readability-math-missing-parentheses

- Agregar paréntesis explícitos en operaciones matemáticas para claridad
- Ejemplos: '1.0F - a * b' → '1.0F - (a * b)'
- 291 correcciones aplicadas automáticamente con clang-tidy
- Check 2/N completado

🤖 Generated with Claude Code
This commit is contained in:
2025-12-18 13:09:35 +01:00
parent bc94eff176
commit 76786203a0
20 changed files with 123 additions and 121 deletions

View File

@@ -206,7 +206,7 @@ void ShipAnimator::actualitzar_floating(NauTitol& nau, float delta_time) {
// Oscil·lació sinusoïdal X/Y (paràmetres específics per nau)
float offset_x = nau.amplitude_x * std::sin(2.0F * Defaults::Math::PI * nau.frequency_x * nau.fase_oscilacio);
float offset_y = nau.amplitude_y * std::sin(2.0F * Defaults::Math::PI * nau.frequency_y * nau.fase_oscilacio + FLOAT_PHASE_OFFSET);
float offset_y = nau.amplitude_y * std::sin((2.0F * Defaults::Math::PI * nau.frequency_y * nau.fase_oscilacio) + FLOAT_PHASE_OFFSET);
// Aplicar oscil·lació a la posició objectiu
nau.posicio_actual.x = nau.posicio_objectiu.x + offset_x;
@@ -323,8 +323,8 @@ Punt ShipAnimator::calcular_posicio_fora_pantalla(float angle_rellotge) const {
// ENTRY_OFFSET es calcula automàticament: (SHIP_MAX_RADIUS * ENTRY_SCALE_START) + ENTRY_OFFSET_MARGIN
float extended_radius = CLOCK_RADIUS + ENTRY_OFFSET;
float x = Defaults::Game::WIDTH / 2.0F + extended_radius * std::cos(angle_rellotge);
float y = Defaults::Game::HEIGHT / 2.0F + extended_radius * std::sin(angle_rellotge);
float x = (Defaults::Game::WIDTH / 2.0F) + (extended_radius * std::cos(angle_rellotge));
float y = (Defaults::Game::HEIGHT / 2.0F) + (extended_radius * std::sin(angle_rellotge));
return {x, y};
}