Oriol Brufau 2024-03-30 14:30:13 +01:00 committed by GitHub
parent a7ad92d9a3
commit fff9ef87e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 97 additions and 181 deletions

View file

@ -21,9 +21,10 @@ fn srgb_legacy_from_floats(red: f32, green: f32, blue: f32, alpha: f32) -> Absol
// Color
#[test]
fn test_rgba_color_interepolation_preserves_transparent() {
let transparent = AbsoluteColor::TRANSPARENT_BLACK;
assert_eq!(
interpolate_color(AbsoluteColor::TRANSPARENT, AbsoluteColor::TRANSPARENT, 0.5),
AbsoluteColor::TRANSPARENT
interpolate_color(transparent, transparent, 0.5),
transparent
);
}