Codeworks on vacahy

This commit is contained in:
2024-12-10 20:31:39 -06:00
parent c2692a27ae
commit b89d908e8c

View File

@@ -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),