clang-tidy

This commit is contained in:
2025-07-20 12:16:25 +02:00
parent a7ef29b750
commit bfda842d3c
43 changed files with 512 additions and 504 deletions

View File

@@ -321,7 +321,11 @@ void Background::createSunPath() {
constexpr float RADIUS = 120;
// Generar puntos de la curva desde 90 a 180 grados
for (double theta = M_PI / 2; theta <= M_PI; theta += 0.01) {
constexpr double STEP = 0.01;
const int NUM_STEPS = static_cast<int>((M_PI - M_PI / 2) / STEP) + 1;
for (int i = 0; i < NUM_STEPS; ++i) {
double theta = M_PI / 2 + i * STEP;
float x = CENTER_X + (RADIUS * cos(theta));
float y = CENTER_Y - (RADIUS * sin(theta));
sun_path_.push_back({x, y});
@@ -342,7 +346,11 @@ void Background::createMoonPath() {
constexpr float RADIUS = 140;
// Generar puntos de la curva desde 0 a 90 grados
for (double theta = 0; theta <= M_PI / 2; theta += 0.01) {
constexpr double STEP = 0.01;
const int NUM_STEPS = static_cast<int>((M_PI / 2 - 0) / STEP) + 1;
for (int i = 0; i < NUM_STEPS; ++i) {
double theta = 0 + i * STEP;
float x = CENTER_X + (RADIUS * cos(theta));
float y = CENTER_Y - (RADIUS * sin(theta));
moon_path_.push_back({x, y});