- took out static_cast in McDecimater
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@716 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -136,9 +136,9 @@ size_t McDecimaterT<Mesh>::decimate(size_t _n_collapses) {
|
|||||||
|
|
||||||
// Random halfedge handle
|
// Random halfedge handle
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
tmpHandle = typename Mesh::HalfedgeHandle(int(randGen.getRand() * (mesh_.n_halfedges() - 1)) );
|
tmpHandle = typename Mesh::HalfedgeHandle(int(randGen.getRand() * (mesh_.n_halfedges() - 1)) );
|
||||||
#else
|
#else
|
||||||
tmpHandle = typename Mesh::HalfedgeHandle((static_cast<double>(rand()) / RAND_MAX) * (mesh_.n_halfedges()-1) );
|
tmpHandle = typename Mesh::HalfedgeHandle( (double(rand()) / double(RAND_MAX) ) * double(mesh_.n_halfedges()-1) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if it is not deleted, we analyse it
|
// if it is not deleted, we analyse it
|
||||||
@@ -258,9 +258,9 @@ size_t McDecimaterT<Mesh>::decimate_to_faces(size_t _nv, size_t _nf) {
|
|||||||
|
|
||||||
// Random halfedge handle
|
// Random halfedge handle
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
tmpHandle = typename Mesh::HalfedgeHandle(int(randGen.getRand() * (mesh_.n_halfedges() - 1)) );
|
tmpHandle = typename Mesh::HalfedgeHandle(int(randGen.getRand() * (mesh_.n_halfedges() - 1)) );
|
||||||
#else
|
#else
|
||||||
tmpHandle = typename Mesh::HalfedgeHandle((static_cast<double>(rand()) / RAND_MAX) * (mesh_.n_halfedges() - 1));
|
tmpHandle = typename Mesh::HalfedgeHandle( ( double(rand()) / double(RAND_MAX) ) * double(mesh_.n_halfedges() - 1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if it is not deleted, we analyse it
|
// if it is not deleted, we analyse it
|
||||||
|
|||||||
Reference in New Issue
Block a user