fn rgb_from_genes(genes: &Vec<i32>) -> Rgb {
  let r = genes[0] as f32 / 255.0;
  let g = genes[1] as f32 / 255.0;
  let b = genes[2] as f32 / 255.0;
  rgb(r, g, b)
}
// TODO: might be cleaner to have dna.genes as an Array to allow destructuring
might be cleaner to have dna.genes as an Array to allow destructuring
might be cleaner to have dna . genes as an Array to allow destructuring
fn rgb_from_genes(genes: &Vec<i32>) -> Rgb {
  let r = genes[0] as f32 / 255.0;
  let g = genes[1] as f32 / 255.0;
  let b = genes[2] as f32 / 255.0;
  rgb(r, g, b)
}
fn rgb_from_genes ( genes : & Vec < i32 > ) -> Rgb { let r = genes [ 0 ] as f32 / 255.0 ; let g = genes [ 1 ] as f32 / 255.0 ; let b = genes [ 2 ] as f32 / 255.0 ; rgb ( r , g , b ) }
TODO: might be cleaner to have dna.genes as an Array to allow destructuring
TODO : might be cleaner to have dna . genes as an Array to allow destructuring
genes
&Vec<i32>