Skip to content

Commit

Permalink
refactor: improved code order of den_to_babylonian()
Browse files Browse the repository at this point in the history
  • Loading branch information
craigmayhew committed May 22, 2024
1 parent 2f974af commit 1566154
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/cruncher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ mod numerics_to_text {
for i in 1..59 {
glyphs.push(format!("{}{}", TENS[i / 10], UNITS[i % 10]));
}
let mut val: Vec<&str> = Vec::with_capacity(1);
let mut num: BigUint = num_bigint::BigUint::from_str_radix(&str_num, 10).unwrap();
let mut num: BigUint = BigUint::from_str_radix(&str_num, 10).unwrap();
let sixty: BigUint = 60.to_biguint().unwrap();
let mut val: Vec<&str> = Vec::with_capacity(1);
while num > Zero::zero() {
val.push(
&glyphs[(&num % &sixty)
Expand Down

0 comments on commit 1566154

Please sign in to comment.