From 06df761de1004e7d9aca779bcf2cd4b0bc48935c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 24 Mar 2020 10:51:27 +0100 Subject: [PATCH] Use a random seed by default (instead of a fixed seed of 0) --- .../include/CGAL/Optimal_bounding_box/oriented_bounding_box.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h index 55e777543ea..f8a31c5c78f 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/oriented_bounding_box.h @@ -289,9 +289,9 @@ void oriented_bounding_box(const PointRange& points, PointMap point_map = choose_parameter(get_parameter(np, internal_np::point_map)); const bool use_ch = choose_parameter(get_parameter(np, internal_np::use_convex_hull), true); - const unsigned int seed = choose_parameter(get_parameter(np, internal_np::random_seed), 0); // undocumented + const unsigned int seed = choose_parameter(get_parameter(np, internal_np::random_seed), -1); // undocumented - CGAL::Random rng(seed); + CGAL::Random rng = (seed == unsigned(-1)) ? CGAL::get_default_random() : CGAL::Random(seed); // @todo handle those cases instead if(points.size() <= 3)