diff options
author | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-04-19 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicholasjohnson.ch> | 2024-04-19 00:00:00 +0000 |
commit | 43537a3b137c3d88b8cd2c8d2f8a4257aebfa45d4ee8e2ad98ae80c7f5c9d620 (patch) | |
tree | 086820808addd9a32db666d35c31142cfc749809e9ff218c3a402ac261095a2c /src/hitomezashi.rs | |
parent | f6130ec71273f22b6d9b9b4c17811cec83052eab74e8ad50b394b92fb63e9062 (diff) | |
download | hitomezashi-rs-43537a3b137c3d88b8cd2c8d2f8a4257aebfa45d4ee8e2ad98ae80c7f5c9d620.tar.gz hitomezashi-rs-43537a3b137c3d88b8cd2c8d2f8a4257aebfa45d4ee8e2ad98ae80c7f5c9d620.zip |
Use double-precision floating-point for skew
Diffstat (limited to 'src/hitomezashi.rs')
-rw-r--r-- | src/hitomezashi.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<f32>) { +pub fn hitomezashi(width: usize, height: usize, skew: Option<f64>) { let skew: f64 = match skew { - Some(n) => { n.into() } + Some(n) => { n } None => { 0.5 } }; |