Closed erwanvivien closed 5 months ago
Added a debug in src/drawing/line.rs:66
:
[imageproc\src\drawing\line.rs:67] ret = (
239,
0,
)
[imageproc\src\drawing\line.rs:67] ret = (
240,
-1,
)
And then src/drawing/line.rs:123
casts it to u32
So changing the positions to ⬇️ fixes it
let (from, to) = (
(240.49998f32.floor(), 0.5f32.floor()),
(12.726593f32.floor(), 164.87411f32.floor()
);
I think Brehendam should not take f32
if it cannot handle it properly (we cast to i32 directly)
Other code like draw_antialiased_line_segment
already takes (i32, i32)
Thanks to both of you :)
I found this code to be panicking (because of out-of-bound access)
Crashes with
Has anyone an idea?