From 8ae528e9a2b219c5ac2f0b967c0cb91e79921e21 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Thu, 12 Nov 2020 23:37:43 +0100 Subject: Fix the polygon point containment algorithm The algorithm before was really not working for a lot of edge cases and very difficult to adapt. This version is definitely not the be-all and end-all, but it should work for most (well, hopefully all) cases. After refactoring and hopefully simplifying and straightening out the logic a little more, it should be verifiable. --- src/math/line_segment.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/math/line_segment.rs') diff --git a/src/math/line_segment.rs b/src/math/line_segment.rs index d7bcdb1..338a681 100644 --- a/src/math/line_segment.rs +++ b/src/math/line_segment.rs @@ -3,6 +3,7 @@ use alga::general::{ClosedMul, ClosedSub}; use nalgebra::Scalar; use num_traits::Zero; +#[derive(Debug)] pub struct LineSegment { pub start: Vec2, pub end: Vec2, -- cgit v1.2.3-70-g09d2