We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0923401 commit fdd617dCopy full SHA for fdd617d
src/geometric_transformations.rs
@@ -336,8 +336,8 @@ where
336
let cos = theta.cos();
337
let sin = theta.sin();
338
339
- let new_width = (height as f32 * sin.abs() + width as f32 * cos.abs()).ceil() as u32;
340
- let new_height = (height as f32 * cos.abs() + width as f32 * sin.abs()).ceil() as u32;
+ let new_width = (height as f32 * sin.abs() + width as f32 * cos.abs()).round() as u32;
+ let new_height = (height as f32 * cos.abs() + width as f32 * sin.abs()).round() as u32;
341
342
let mut out_img = Image::new(new_width, new_height);
343
0 commit comments