From 230c6d74b2684a447a184f8b2f8485204615630f Mon Sep 17 00:00:00 2001 From: Elfein Landers Date: Thu, 3 Feb 2022 19:36:09 -0800 Subject: [PATCH] fixed order of ops bug --- shadeable/src/pixel_format.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shadeable/src/pixel_format.rs b/shadeable/src/pixel_format.rs index b14c0517..4fa182bb 100644 --- a/shadeable/src/pixel_format.rs +++ b/shadeable/src/pixel_format.rs @@ -2,14 +2,14 @@ use vga::colors::Color16; pub type Rgba64 = u64; pub fn get_r(rgba: Rgba64) -> u8 { - (rgba & 0xff_00_00_00 >> 0o30) as u8 + ((rgba & 0xff_00_00_00) >> 0o30) as u8 } pub fn get_g(rgba: Rgba64) -> u8 { - (rgba & 0xff_00_00 >> 0o20) as u8 + ((rgba & 0xff_00_00) >> 0o20) as u8 } pub fn get_b(rgba: Rgba64) -> u8 { - (rgba & 0xff_00 >> 0o10) as u8 + ((rgba & 0xff_00) >> 0o10) as u8 } pub fn get_a(rgba: Rgba64) -> u8 {