Trivial bug-fix: use FT(n) instead of (FT)n.0

In our concepts, (FT)0.0 and (FT)1.0 (conversion from doubles) are not
always allowed, but the construction of an FT from an integer is in the
concept FieldNumberType (because it refines IntegralDomainWithoutDivision,
that refines FromIntConstructible).

The testsuite of PCA passes on my machine, and the bug "fix" is trivial.
Approved for CGAL-4.3 by the Release Manager.
This commit is contained in:
Laurent Rineau 2013-09-25 15:08:09 +02:00
parent 8b8e007387
commit 04ad0af983
1 changed files with 2 additions and 2 deletions

View File

@ -696,7 +696,7 @@ fitting_plane_3(const typename K::FT covariance[6], // covariance matrix
// assemble a default horizontal plane that goes
// through the centroid.
plane = Plane(c,Vector(FT(0),FT(0),FT(1)));
return (FT)0.0;
return FT(0);
}
else // regular and line case
{
@ -704,7 +704,7 @@ fitting_plane_3(const typename K::FT covariance[6], // covariance matrix
eigen_vectors[7],
eigen_vectors[8]);
plane = Plane(c,normal);
return (FT)1.0 - eigen_values[2] / eigen_values[1];
return FT(1) - eigen_values[2] / eigen_values[1];
} // end regular case
}