mthh / contour-rs

Contour polygon creation in Rust (using marching squares algorithm)
https://crates.io/crates/contour
Apache License 2.0
50 stars 10 forks source link

Fix overflow when using large raster sizes #13

Closed netthier closed 2 months ago

netthier commented 2 months ago

This fixes https://github.com/mthh/contour-rs/issues/12. It contains breaking changes, as some u32s in public function signatures have been swapped with usizes, requiring an appropriate version bump.

netthier commented 2 months ago

Huh, what's that failure on nightly there? Seems like f32 literals are broken?

UPDATE: I think we're hitting https://github.com/rust-lang/rust/issues/123824, it should be fine to ignore? Though maybe explicitly specifying a type would make sense here, this doesn't seem well-defined. Let me know if you want me to add that to this PR or not.

netthier commented 2 months ago

Do not merge this, it seems like there is another precision issue. I'll post more details in the issue

mthh commented 2 months ago

I think we're hitting https://github.com/rust-lang/rust/issues/123824 [...] Let me know if you want me to add that to this PR or not.

Yeah I think so. The PR fixing the issue you reference seems to be in the merge queue so no need to worry about that, I think.

it seems like there is another precision issue. I'll post more details in the issue

Alright :-/

mthh commented 2 months ago

Great, thanks for your contribution. I will merge this now (and make a new release later today) because it brings improvements and corrections that are already useful. And we'll continue the discussion on #14.