linter
This commit is contained in:
+4
-4
@@ -72,8 +72,8 @@ struct Color {
|
||||
static auto fromHex(const std::string& hex_str) -> Color;
|
||||
|
||||
// Conversiones de formato de color
|
||||
[[nodiscard]] constexpr static auto rgbToHsv(Color color) -> HSV;
|
||||
[[nodiscard]] constexpr static auto hsvToRgb(HSV hsv) -> Color;
|
||||
[[nodiscard]] constexpr static auto RGB_TO_HSV(Color color) -> HSV;
|
||||
[[nodiscard]] constexpr static auto HSV_TO_RGB(HSV hsv) -> Color;
|
||||
|
||||
[[nodiscard]] constexpr auto IS_EQUAL_TO(const Color& other) const -> bool {
|
||||
return r == other.r && g == other.g && b == other.b && a == other.a;
|
||||
@@ -98,11 +98,11 @@ struct Color {
|
||||
// Interpolación lineal hacia otro color (t=0.0: this, t=1.0: target)
|
||||
[[nodiscard]] constexpr auto LERP(const Color& target, float t) const -> Color {
|
||||
// Asegurar que t esté en el rango [0.0, 1.0]
|
||||
t = std::clamp(t, 0.0f, 1.0f);
|
||||
t = std::clamp(t, 0.0F, 1.0F);
|
||||
|
||||
// Interpolación lineal para cada componente
|
||||
auto lerp_component = [t](Uint8 start, Uint8 end) -> Uint8 {
|
||||
return static_cast<Uint8>(start + (end - start) * t);
|
||||
return static_cast<Uint8>(start + ((end - start) * t));
|
||||
};
|
||||
|
||||
return Color(
|
||||
|
||||
Reference in New Issue
Block a user