The direction must be != 0 in the constructor of the rotation

This commit is contained in:
Andreas Fabri 2006-12-17 22:28:35 +00:00
parent d0eb962543
commit 0be85d575d
2 changed files with 2 additions and 1 deletions

View File

@ -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,

View File

@ -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;