diff --git a/Kernel_23/doc_tex/Kernel_23_ref/Aff_transformation_2.tex b/Kernel_23/doc_tex/Kernel_23_ref/Aff_transformation_2.tex index 765f06f7a01..82144c87a78 100644 --- a/Kernel_23/doc_tex/Kernel_23_ref/Aff_transformation_2.tex +++ b/Kernel_23/doc_tex/Kernel_23_ref/Aff_transformation_2.tex @@ -49,7 +49,7 @@ therefore do not appear in the constructors. $d$, such that the differences between the sines and cosines of the rotation given by d and the approximating rotation are at most $num/den$ each. - \ccPrecond $num/den>0$. } + \ccPrecond $num/den>0$ and $d != 0$. } \ccConstructor{Aff_transformation_2(const Rotation, const Kernel::RT &sine_rho, diff --git a/Kernel_23/include/CGAL/rational_rotation.h b/Kernel_23/include/CGAL/rational_rotation.h index 6a2b9b50717..ef3f98ce3e7 100644 --- a/Kernel_23/include/CGAL/rational_rotation.h +++ b/Kernel_23/include/CGAL/rational_rotation.h @@ -44,6 +44,7 @@ rational_rotation_approximation( const NT & dirx, // dir.x() const NT& d = eps_den; const NT NT0 = NT(0) ; const NT NT1 = NT(1) ; + CGAL_kernel_precondition( (dirx != NT0) || (diry != NT0)); CGAL_kernel_precondition( n > NT0 ); CGAL_kernel_precondition( d > NT0 ); NT & sin = sin_num;