From 43537a3b137c3d88b8cd2c8d2f8a4257aebfa45d4ee8e2ad98ae80c7f5c9d620 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Fri, 19 Apr 2024 00:00:00 +0000 Subject: Use double-precision floating-point for skew --- src/hitomezashi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/hitomezashi.rs') diff --git a/src/hitomezashi.rs b/src/hitomezashi.rs index d5aa417..dede1ac 100644 --- a/src/hitomezashi.rs +++ b/src/hitomezashi.rs @@ -25,9 +25,9 @@ fn print_square(is_transparent: bool) { print!("{}", if is_transparent { TRANSPARENT_SQUARE } else { OPAQUE_SQUARE }); } -pub fn hitomezashi(width: usize, height: usize, skew: Option) { +pub fn hitomezashi(width: usize, height: usize, skew: Option) { let skew: f64 = match skew { - Some(n) => { n.into() } + Some(n) => { n } None => { 0.5 } }; -- cgit v1.2.3