daily pastebin goal

[Rust] The RGB model constructor of Color class

cwchen Aug 28th, 2017 430 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. impl Color {
  2.     // Constructor for RGB model
  3.     pub fn from_rgb(r: u8, g: u8, b: u8) -> Color {
  4.         Color::RGB{ r: r, g: g, b: b }
  5.     }
  6. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand