diff --git a/src/components/plates/util.rs b/src/components/plates/util.rs index 845d1ae..51de79b 100644 --- a/src/components/plates/util.rs +++ b/src/components/plates/util.rs @@ -35,15 +35,15 @@ impl ColorPalette { self.get((2f64.powi(-(t.ilog2() as i32))) * (t as f64 + 0.5f64) - 1.0f64) } - pub fn get_uuid(&self, t: uuid::Uuid) -> [f64; 3] { - // self.get(t.as_u128() as f64 / (u128::MAX) as f64) - let mut r = SmallRng::seed_from_u64(t.as_u128() as u64); - self.get(r.gen_range(0.0..1.0f64)) - } + // pub fn get_uuid(&self, t: uuid::Uuid) -> [f64; 3] { + // // self.get(t.as_u128() as f64 / (u128::MAX) as f64) + // let mut r = SmallRng::seed_from_u64(t.as_u128() as u64); + // self.get(r.gen_range(0.0..1.0f64)) + // } pub fn get_ordered(&self, t: uuid::Uuid, ordered_uuids: &Vec) -> [f64; 3] { - let index = ordered_uuids.iter().position(|&x| x == t).expect("uuid must be in list of uuids"); + let index = ordered_uuids.iter().position(|&x| x == t).expect("uuid must be in list of uuids") + 1; return self.get(Self::space_evenly(index)) }