30 Dec
2016
30 Dec
'16
9:03 a.m.
Thank you, I will watch it. Belowing code gives "floating point divide by zero" error std::vector<Segment>segments; segments.push_back(Segment(40, 0, 40, 100)); segments.push_back(Segment(40, 0, 100, 0)); segments.push_back(Segment(40, 100, 100, 100)); segments.push_back(Segment(100, 0, 100, 30)); segments.push_back(Segment(70, 30, 100, 30)); segments.push_back(Segment(70, 30, 70, 70)); segments.push_back(Segment(70, 70, 100, 70)); segments.push_back(Segment(100, 70, 100, 100)); // Construction of the Voronoi Diagram. voronoi_diagram<double>vd; * construct_voronoi(segments.begin(), segments.end(), &vd); // it gives floating point divide by zero error* My drawing, [image: Inline image 2]