dimforge / dimforge/ncollide

Shape::contains_point fails with big numbers

Open
#367 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
926
Forks
104
PR merge metrics
No merged PRs in 30d

Description

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

```rust
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)
));
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.