mirror of https://github.com/CGAL/cgal
Using CGAL::is_zero
This commit is contained in:
parent
a2dd287a07
commit
3a254451e2
|
|
@ -88,7 +88,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
0.0, radius};
|
||||
Matrix transformation = init_matrix<FT>(2,delta);
|
||||
FT area = t.squared_radius();
|
||||
CGAL_assertion(area != 0.0);
|
||||
CGAL_assertion(!CGAL::is_zero(area));
|
||||
|
||||
// Find the 2nd order moment for the circle wrt to the origin by an affine transformation.
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
0.0, radius};
|
||||
Matrix transformation = init_matrix<FT>(2,delta);
|
||||
FT length = 2 * radius;
|
||||
CGAL_assertion(length != FT(0));
|
||||
CGAL_assertion(!CGAL::is_zero(length));
|
||||
|
||||
// Find the 2nd order moment for the circle wrt to the origin by an affine transformation.
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
Matrix transformation = init_matrix<FT>(2,delta);
|
||||
FT area = (x1-x0)*(y2-y0);
|
||||
|
||||
CGAL_assertion(area != FT(0));
|
||||
CGAL_assertion(!CGAL::is_zero(area));
|
||||
|
||||
// Find the 2nd order moment for the rectangle wrt to the origin by an affine transformation.
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
mass += area;
|
||||
}
|
||||
|
||||
CGAL_assertion_msg (mass != FT(0), "Can't compute PCA of null measure.");
|
||||
CGAL_assertion_msg (!CGAL::is_zero(mass), "Can't compute PCA of null measure.");
|
||||
|
||||
// Translate the 2nd order moment calculated about the origin to
|
||||
// the center of mass to get the covariance.
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
Matrix transformation = init_matrix<FT>(2,delta);
|
||||
using std::sqrt;
|
||||
FT length = CGAL::approximate_sqrt(t.squared_length());
|
||||
CGAL_assertion(length != FT(0));
|
||||
CGAL_assertion(!CGAL::is_zero(length));
|
||||
|
||||
// Find the 2nd order moment for the segment wrt to the origin by an affine transformation.
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
|
||||
Matrix transformation = init_matrix<FT>(2,delta);
|
||||
FT area = FT(0.5) * CGAL::abs(LA::determinant(transformation));
|
||||
CGAL_assertion(area!=FT(0));
|
||||
CGAL_assertion(!CGAL::is_zero(area));
|
||||
|
||||
// Find the 2nd order moment for the triangle wrt to the origin by an affine transformation.
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
mass += area;
|
||||
}
|
||||
|
||||
CGAL_assertion_msg (mass != FT(0), "Can't compute PCA of null measure.");
|
||||
CGAL_assertion_msg (!CGAL::is_zero(mass), "Can't compute PCA of null measure.");
|
||||
|
||||
// Translate the 2nd order moment calculated about the origin to
|
||||
// the center of mass to get the covariance.
|
||||
|
|
|
|||
Loading…
Reference in New Issue