mirror of https://github.com/CGAL/cgal
Condition the creation of the weighted point to a good stream reading
This commit is contained in:
parent
fdb17cb3f1
commit
1747e8e932
|
|
@ -41,11 +41,11 @@ int main()
|
||||||
int n;
|
int n;
|
||||||
is >> n;
|
is >> n;
|
||||||
std::cout << "Reading " << n << " points " << std::endl;
|
std::cout << "Reading " << n << " points " << std::endl;
|
||||||
for( ; n>0 ; n--) {
|
for( ; n>0 ; n--)
|
||||||
|
{
|
||||||
Bare_point bp;
|
Bare_point bp;
|
||||||
is >> bp;
|
if(is >> bp)
|
||||||
Weighted_point p(bp, 0.0001 * random.get_double(0., 0.015625)); // arbitrary weights
|
pts.emplace_back(bp, 0.0001 * random.get_double(0., 0.015625)); // arbitrary weights
|
||||||
pts.push_back(p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define the periodic cube
|
// Define the periodic cube
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue