canvi de pc

This commit is contained in:
2025-02-21 18:26:32 +01:00
parent 04ff428aa0
commit 29c85fecad
6 changed files with 179 additions and 36 deletions

View File

@@ -32,20 +32,20 @@ const Color green_sky_color = Color(0X00, 0X79, 0X6B);
// Obtiene un color del vector de colores imitando al Coche Fantástico
Color getColorLikeKnightRider(const std::vector<Color> &colors, int counter_)
{
int cycle_length = colors.size() * 2 - 2;
size_t n = counter_ % cycle_length;
int cycle_length = colors.size() * 2 - 2;
size_t n = counter_ % cycle_length;
size_t index;
if (n < colors.size())
{
index = n; // Avanza: 0,1,2,3
}
else
{
index = 2 * (colors.size() - 1) - n; // Retrocede: 2,1
}
size_t index;
if (n < colors.size())
{
index = n; // Avanza: 0,1,2,3
}
else
{
index = 2 * (colors.size() - 1) - n; // Retrocede: 2,1
}
return colors[index];
return colors[index];
}
// Calcula el cuadrado de la distancia entre dos puntos
@@ -339,4 +339,4 @@ std::string getPath(const std::string &full_path)
{
std::filesystem::path path(full_path);
return path.parent_path().string();
}
}