Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shape::contains_point fails with big numbers #367

Open
wucke13 opened this issue Nov 6, 2020 · 0 comments
Open

Shape::contains_point fails with big numbers #367

wucke13 opened this issue Nov 6, 2020 · 0 comments

Comments

@wucke13
Copy link

wucke13 commented Nov 6, 2020

Why does this code fail? Making the 1e19 small enough (1e18) eventually makes it work, but that seems quite ugh. Is this expected behavior?

let poly = ConvexPolygon::try_from_points(&vec![
            Point::new(1600.0f64, 100.0),
            Point::new(10100.0, 1958.0),
            Point::new(1e20, 1958.0),
            Point::new(1e20, 100.0),
        ]).expect("Convex hull computation failed.");

  assert!(poly.contains_point(
    &Isometry::identity(),
    &Point::new(1e19, 300.0)
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant