mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-27 00:12:55 +03:00
fix crash in to_thick_boundary triggered in the 23rd map
This commit is contained in:
parent
faea2e94e3
commit
e350d10578
@ -65,7 +65,7 @@ impl PolyLine {
|
|||||||
boundary_width: Distance,
|
boundary_width: Distance,
|
||||||
) -> Option<Polygon> {
|
) -> Option<Polygon> {
|
||||||
assert!(self_width > boundary_width);
|
assert!(self_width > boundary_width);
|
||||||
if self.length() <= boundary_width {
|
if self.length() <= boundary_width + EPSILON_DIST {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
let slice = self.exact_slice(boundary_width / 2.0, self.length() - boundary_width / 2.0);
|
let slice = self.exact_slice(boundary_width / 2.0, self.length() - boundary_width / 2.0);
|
||||||
|
Loading…
Reference in New Issue
Block a user