fixed test suite errors in examples

This commit is contained in:
Dmitry Anisimov 2021-08-16 11:56:36 +02:00
parent ec13e880a4
commit c2a1f047eb
4 changed files with 6 additions and 3 deletions

View File

@ -109,7 +109,7 @@ int main (int argc, char** argv)
// Save in colored_circles.ply
std::ofstream out ("colored_circles.ply");
CGAL::set_binary_mode (out);
CGAL::IO::set_binary_mode (out);
out << points3;
return EXIT_SUCCESS;

View File

@ -90,7 +90,7 @@ int main (int argc, char** argv)
// Save in colored_cylinders.ply
std::ofstream out ("colored_cylinders.ply");
CGAL::set_binary_mode (out);
CGAL::IO::set_binary_mode (out);
out << points;
return EXIT_SUCCESS;

View File

@ -90,7 +90,7 @@ int main (int argc, char** argv)
// Save in colored_spheres.ply
std::ofstream out ("colored_spheres.ply");
CGAL::set_binary_mode (out);
CGAL::IO::set_binary_mode (out);
out << points;
return EXIT_SUCCESS;

View File

@ -44,6 +44,9 @@ namespace internal {
public:
FT operator()(const FT value) const {
// TODO: This happens for circles and cylinders only! Maybe after my
// precision cleaning in the new revision PR, this will be gone for all platforms.
if (value < FT(0)) return FT(0); // clamp to zero
CGAL_precondition(value >= FT(0));
return static_cast<FT>(CGAL::sqrt(CGAL::to_double(value)));
}