mirror of https://github.com/CGAL/cgal
Fix more conversion warnings
This commit is contained in:
parent
7d716c0be7
commit
c9a331ec19
|
|
@ -241,7 +241,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
// isotropic case (infinite number of directions)
|
||||
// by default: assemble a line that goes through
|
||||
// the centroid and with a default horizontal vector.
|
||||
line = Line(c, Vector(1.0, 0.0));
|
||||
line = Line(c, Vector(FT(1), FT(0)));
|
||||
return (FT)0.0;
|
||||
}
|
||||
} // end linear_least_squares_fitting_2 for circle set with 1D tag
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
transformation = area * transformation * moment * LA::transpose(transformation);
|
||||
|
||||
// Translate the 2nd order moment to the center of the rectangle.
|
||||
FT xav0 = (x1-x0)/2.0;
|
||||
FT yav0 = (y2-y0)/2.0;
|
||||
FT xav0 = (x1-x0)/FT(2);
|
||||
FT yav0 = (y2-y0)/FT(2);
|
||||
// and add to covariance matrix
|
||||
covariance[0] += transformation[0][0] + area * (x0*xav0*2 + x0*x0);
|
||||
covariance[1] += transformation[0][1] + area * (x0*yav0 + xav0*y0 + x0*y0);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
t[1].y() - y0, t[2].y() - y0};
|
||||
|
||||
Matrix transformation = init_matrix<FT>(2,delta);
|
||||
FT area = 0.5 * CGAL::abs(LA::determinant(transformation));
|
||||
FT area = FT(0.5) * CGAL::abs(LA::determinant(transformation));
|
||||
CGAL_assertion(area!=0);
|
||||
|
||||
// Find the 2nd order moment for the triangle wrt to the origin by an affine transformation.
|
||||
|
|
@ -97,8 +97,8 @@ linear_least_squares_fitting_2(InputIterator first,
|
|||
transformation = 2 * area * transformation * moment * LA::transpose(transformation);
|
||||
|
||||
// Translate the 2nd order moment to (x0,y0).
|
||||
FT xav0 = (delta[0]+delta[1])/3.0;
|
||||
FT yav0 = (delta[2]+delta[3])/3.0;
|
||||
FT xav0 = (delta[0]+delta[1])/FT(3);
|
||||
FT yav0 = (delta[2]+delta[3])/FT(3);
|
||||
|
||||
// and add to the covariance matrix
|
||||
covariance[0] += transformation[0][0] + area * (x0*xav0*2 + x0*x0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue