Minor fixes
This commit is contained in:
@@ -105,7 +105,6 @@ public:
|
||||
u8 a;
|
||||
public:
|
||||
|
||||
|
||||
/// The default constructor does not initialize any members.
|
||||
Color4() = default;
|
||||
|
||||
@@ -148,6 +147,7 @@ public:
|
||||
|
||||
static Color4 FromHSV(float hue, float saturation, float value, float alpha = 1.f) {
|
||||
// TODO: implement
|
||||
return {};
|
||||
}
|
||||
static Color4 FromHSL(float hue, float saturation, float lightness, float alpha = 1.f);
|
||||
static Color4 FromNormalized(float red, float green, float blue, float alpha = 1.f);
|
||||
@@ -197,9 +197,7 @@ public:
|
||||
HSL ToHSL() const;
|
||||
HSLA ToHSLA() const;
|
||||
|
||||
LCH ToLCH() const {
|
||||
|
||||
}
|
||||
LCH ToLCH() const;
|
||||
|
||||
|
||||
};
|
@@ -229,7 +229,7 @@ HSV Color4::ToHSV() const {
|
||||
|
||||
float delta = Cmax - Cmin;
|
||||
|
||||
float hue = 0.0;
|
||||
float hue = 0.f;
|
||||
|
||||
if (Cmax == rn) hue = 60.f * std::fmod((gn - bn) / delta, 6.0);
|
||||
if (Cmax == gn) hue = 60.f * ((gn - rn) / delta) + 2;
|
||||
@@ -293,3 +293,8 @@ HSLA Color4::ToHSLA() const
|
||||
HSL hsl = ToHSL();
|
||||
return {hsl.h, hsl.s, hsl.l, AN()};
|
||||
}
|
||||
|
||||
LCH Color4::ToLCH() const {
|
||||
// TODO: Implement
|
||||
return {};
|
||||
}
|
||||
|
Reference in New Issue
Block a user