From efd4b521d205a32eb80ea1fa765ef2bac35bcae9 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Wed, 28 Feb 2024 22:28:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A6=82=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/name.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/name.rs b/src/name.rs index 461ff2c..038d844 100644 --- a/src/name.rs +++ b/src/name.rs @@ -97,19 +97,19 @@ impl Namer { let mut prop_cnt = 0; let mut r = name_base[0..32].to_vec(); for i in (10..31).step_by(3) { - // props[p_cnt++] = max(min(a[this.p], a[this.p + 1]), - // min(max(a[this.p], a[this.p + 1]), a[this.p + 2])) - // name_prop[prop_cnt] = r[i + 1] as u32; name_prop[prop_cnt] = median(r[i], r[i + 1], r[i + 2]) as u32; prop_cnt += 1; } - println!("r:{:?} name base{:?}", r, name_base); + println!("r:{:?}", r); r[0..10].sort(); + println!("r:{:?} {}", r, prop_cnt); name_prop[prop_cnt] = 154; prop_cnt += 1; + println!("name_prop:{:?}", name_prop); for i in 3..7 { name_prop[prop_cnt - 1] += r[i] as u32; } + println!("name_prop:{:?}", name_prop); for i in 0..7 { name_prop[i] += 36; }