Codeworks on vacahy
This commit is contained in:
@@ -127,15 +127,13 @@ Color4 Color4::FromNormalized(float red, float green, float blue, float alpha) {
|
|||||||
static_cast<u8>(blue * 255),
|
static_cast<u8>(blue * 255),
|
||||||
static_cast<u8>(alpha * 255)
|
static_cast<u8>(alpha * 255)
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Color4 Color4::Lerp(const Color4 &rhs, float t) const {
|
Color4 Color4::Lerp(const Color4 &rhs, float t) const {
|
||||||
|
|
||||||
/// Performs the interpolation in normalized color space (0-1) and converts it back.
|
/// Performs the interpolation in normalized color space (0-1) and converts it back.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return FromNormalized(
|
return FromNormalized(
|
||||||
std::lerp(RN(), rhs.RN(), t),
|
std::lerp(RN(), rhs.RN(), t),
|
||||||
std::lerp(GN(), rhs.GN(), t),
|
std::lerp(GN(), rhs.GN(), t),
|
||||||
|
Reference in New Issue
Block a user