Merge pull request #6048 from sloriot/Argt-null_rad

Avoid creating a circle with 0 radius
This commit is contained in:
Laurent Rineau 2021-10-29 16:46:45 +02:00
commit 544f94101c
1 changed files with 5 additions and 2 deletions

View File

@ -58,8 +58,11 @@ int main() {
}
for (int i = 0; i < 10; i++) {
x1 = theRandom.get_int(random_min,random_max);
y1 = theRandom.get_int(random_min,random_max);
do{
x1 = theRandom.get_int(random_min,random_max);
y1 = theRandom.get_int(random_min,random_max);
}
while(x1==0 && y1==0);
boost::variant< Circular_arc_2, Line_arc_2 > v =
Circle_2( Point_2(x1,y1), x1*x1 + y1*y1);
ac.push_back(v);