private bool HasCollision(LineSegment2 other, double tolerance = GeometrySettings.DEFAULT_TOLERANCE)
        {
            // Test each line if it has a collision
            var lines = ToLines();

            foreach (var line in lines)
            {
                if (other.HasCollision(line, tolerance))
                {
                    return(true); // We have a collision and can stop
                }
            }
            return(false);
        }
        private bool HasCollision(LineSegment2 other, double tolerance = GeometrySettings.DEFAULT_TOLERANCE)
        {
            // Test each line if it has a collision
            var lines = ToLines();

            foreach (var line in lines)
            {
                if (other.HasCollision(line, tolerance))
                {
                    return true; // We have a collision and can stop
                }
            }
            return false;
        }